Module: Synchronisable::DSL::Macro::ClassMethods Private
- Defined in:
- lib/synchronisable/dsl/macro.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#attribute(*args) ⇒ Object
private
Defines a new attribute.
- #inherited(subclass) ⇒ Object private
-
#method(*args) ⇒ Object
private
Defines a new method.
Instance Method Details
#attribute(*attrs, options) ⇒ Object #attribute(*attrs) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Defines a new attribute.
68 69 70 |
# File 'lib/synchronisable/dsl/macro.rb', line 68 def attribute(*args) define_expressions(Attribute, args) end |
#inherited(subclass) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 51 52 53 |
# File 'lib/synchronisable/dsl/macro.rb', line 50 def inherited(subclass) super class_attributes[subclass] = Hash[class_attributes[self].map { |k, v| [k, v.clone] }] end |
#method(*attrs, options) ⇒ Object #method(*attrs) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Defines a new method.
82 83 84 |
# File 'lib/synchronisable/dsl/macro.rb', line 82 def method(*args) define_expressions(Method, args) end |