instance method
klass
Ruby on Rails 2.2.3
Since v2.2.3Signature
klass()
Returns the class for the macro. For example, composed_of :balance, :class_name => 'Money' returns the Money class and has_many :clients returns the Client class.
Source
# File activerecord/lib/active_record/reflection.rb, line 100
def klass
@klass ||= class_name.constantize
end
Defined in activerecord/lib/active_record/reflection.rb line 100
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Reflection::MacroReflection