Class: HasVersions::Record::Configuration
- Inherits:
-
Object
- Object
- HasVersions::Record::Configuration
- Defined in:
- lib/has_versions/record/configuration.rb
Instance Attribute Summary collapse
-
#associated_versions_callback ⇒ Object
Returns the value of attribute associated_versions_callback.
-
#attributes ⇒ Object
Returns the value of attribute attributes.
Instance Method Summary collapse
- #associated_versions(&block) ⇒ Object
- #attribute(name) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 |
# File 'lib/has_versions/record/configuration.rb', line 7 def initialize self.attributes = [] end |
Instance Attribute Details
#associated_versions_callback ⇒ Object
Returns the value of attribute associated_versions_callback.
5 6 7 |
# File 'lib/has_versions/record/configuration.rb', line 5 def associated_versions_callback @associated_versions_callback end |
#attributes ⇒ Object
Returns the value of attribute attributes.
4 5 6 |
# File 'lib/has_versions/record/configuration.rb', line 4 def attributes @attributes end |
Instance Method Details
#associated_versions(&block) ⇒ Object
15 16 17 |
# File 'lib/has_versions/record/configuration.rb', line 15 def associated_versions(&block) self.associated_versions_callback = block end |
#attribute(name) ⇒ Object
11 12 13 |
# File 'lib/has_versions/record/configuration.rb', line 11 def attribute(name) attributes << name.to_s end |