Module: Cloned::DSL
- Included in:
- Base
- Defined in:
- lib/cloned/dsl.rb
Instance Attribute Summary collapse
-
#associations ⇒ Object
readonly
Returns the value of attribute associations.
Instance Method Summary collapse
- #after(&block) ⇒ Object
- #association(association_id, options = {}) ⇒ Object
- #before(&block) ⇒ Object
- #nullify(*attributes) ⇒ Object
Instance Attribute Details
#associations ⇒ Object (readonly)
Returns the value of attribute associations.
3 4 5 |
# File 'lib/cloned/dsl.rb', line 3 def associations @associations end |
Instance Method Details
#after(&block) ⇒ Object
9 10 11 |
# File 'lib/cloned/dsl.rb', line 9 def after(&block) define_method :declared_after, &block end |
#association(association_id, options = {}) ⇒ Object
19 20 21 |
# File 'lib/cloned/dsl.rb', line 19 def association(association_id, = {}) associations[association_id] = end |
#before(&block) ⇒ Object
5 6 7 |
# File 'lib/cloned/dsl.rb', line 5 def before(&block) define_method :declared_before, &block end |
#nullify(*attributes) ⇒ Object
13 14 15 16 17 |
# File 'lib/cloned/dsl.rb', line 13 def nullify(*attributes) define_method :clearing_attributes do attributes end end |