Class: Reform::Expose
- Inherits:
-
Object
- Object
- Reform::Expose
- Includes:
- Disposable::Composition
- Defined in:
- lib/reform/composition.rb
Direct Known Subclasses
Class Method Summary collapse
-
.from(representer) ⇒ Object
Builder for a concrete Composition class with configurations from the form’s representer.
Class Method Details
.from(representer) ⇒ Object
Builder for a concrete Composition class with configurations from the form’s representer.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/reform/composition.rb', line 11 def from(representer) = {} representer.representable_attrs.each do |definition| process_definition!(, definition) end Class.new(self).tap do |composition| # for 1.8 compat. you're welcome. composition.map() # puts [email protected] end end |