0
@macro, @name, @options, @active_record = macro, name, options, active_record
0
- # Returns the name of the macro, so it would return :balance for "composed_of :balance, :class_name => 'Money'" or
0
- # :clients for "has_many :clients".
0
+ # Returns the name of the macro. For example, <tt>composed_of :balance, :class_name => 'Money'</tt> will return
0
+ # <tt>:balance</tt> or for <tt>has_many :clients</tt> it will return <tt>:clients</tt>.
0
- # Returns the type of the macro, so it would return :composed_of for
0
- # "composed_of :balance, :class_name => 'Money'" or :has_many for "has_many :clients".
0
+ # Returns the macro type. For example, <tt>composed_of :balance, :class_name => 'Money'</tt> will return <tt>:composed_of</tt>
0
+ # or for <tt>has_many :clients</tt> will return <tt>:has_many</tt>.
0
- # Returns the hash of options used for the macro, so it would return { :class_name => "Money" } for
0
- # "composed_of :balance, :class_name => 'Money'" or {} for "has_many :clients".
0
+ # Returns the hash of options used for the macro. For example, it would return <tt>{ :class_name => "Money" }</tt> for
0
+ # <tt>composed_of :balance, :class_name => 'Money'</tt> or +{}+ for <tt>has_many :clients</tt>.
0
- # Returns the class for the macro, so "composed_of :balance, :class_name => 'Money'" returns the Money class and
0
- # "has_many :clients" returns the Client class.
0
+ # Returns the class for the macro. For example, <tt>composed_of :balance, :class_name => 'Money'</tt> returns the +Money+
0
+ # class and <tt>has_many :clients</tt> returns the +Client+ class.
0
@klass ||= class_name.constantize
0
+ # Returns the class name for the macro. For example, <tt>composed_of :balance, :class_name => 'Money'</tt> returns <tt>'Money'</tt>
0
+ # and <tt>has_many :clients</tt> returns <tt>'Client'</tt>.
0
@class_name ||= options[:class_name] || derive_class_name
0
+ # Returns +true+ if +self+ and +other_aggregation+ have the same +name+ attribute, +active_record+ attribute,
0
+ # and +other_aggregation+ has an options hash assigned to it.
0
def ==(other_aggregation)
0
name == other_aggregation.name && other_aggregation.options && active_record == other_aggregation.active_record