Class: Factory::Proxy::AttributesFor
- Inherits:
-
Factory::Proxy
- Object
- Factory::Proxy
- Factory::Proxy::AttributesFor
- Defined in:
- lib/factory_girl/proxy/attributes_for.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Factory::Proxy
Instance Method Summary collapse
- #get(attribute) ⇒ Object
-
#initialize(klass) ⇒ AttributesFor
constructor
A new instance of AttributesFor.
- #result ⇒ Object
- #set(attribute, value) ⇒ Object
Methods inherited from Factory::Proxy
#add_callback, #associate, #association, #method_missing, #run_callbacks
Constructor Details
#initialize(klass) ⇒ AttributesFor
Returns a new instance of AttributesFor.
4 5 6 |
# File 'lib/factory_girl/proxy/attributes_for.rb', line 4 def initialize(klass) @hash = {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Factory::Proxy
Instance Method Details
#get(attribute) ⇒ Object
8 9 10 |
# File 'lib/factory_girl/proxy/attributes_for.rb', line 8 def get(attribute) @hash[attribute] end |
#result ⇒ Object
16 17 18 |
# File 'lib/factory_girl/proxy/attributes_for.rb', line 16 def result @hash end |
#set(attribute, value) ⇒ Object
12 13 14 |
# File 'lib/factory_girl/proxy/attributes_for.rb', line 12 def set(attribute, value) @hash[attribute] = value end |