Module: Samsa::ClassMethods
- Defined in:
- lib/samsa.rb
Instance Method Summary collapse
Instance Method Details
#transform(input) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/samsa.rb', line 17 def transform(input) t = Transforms.new t.instance_eval(&_definitions) t.run_lazy(input) Samsa::Mapper.new(t.transforms, input) .normalize .with_indifferent_access end |
#transforms(&definitions) ⇒ Object
13 14 15 |
# File 'lib/samsa.rb', line 13 def transforms(&definitions) self._definitions = definitions end |