Class: Disposable::Twin::Decorator
- Inherits:
-
Representable::Decorator
- Object
- Representable::Decorator
- Disposable::Twin::Decorator
- Includes:
- AllowSymbols, Representable::Hash
- Defined in:
- lib/disposable/twin/representer.rb
Class Method Summary collapse
- .build_config ⇒ Object
-
.clone ⇒ Object
DISCUSS: same in reform, is that a bug in represntable?.
Instance Method Summary collapse
Class Method Details
.build_config ⇒ Object
12 13 14 |
# File 'lib/disposable/twin/representer.rb', line 12 def self.build_config Config.new(Definition) end |
.clone ⇒ Object
DISCUSS: same in reform, is that a bug in represntable?
8 9 10 |
# File 'lib/disposable/twin/representer.rb', line 8 def self.clone # called in inheritable_attr :representer_class. Class.new(self) # By subclassing, representable_attrs.clone is called. end |
Instance Method Details
#twin_names ⇒ Object
16 17 18 19 20 |
# File 'lib/disposable/twin/representer.rb', line 16 def twin_names representable_attrs. find_all { |attr| attr[:twin] }. collect { |attr| attr.name.to_sym } end |