Module: Dozer::Mapperable::ClassMethods
- Defined in:
- lib/dozer/mapperable.rb
Instance Method Summary collapse
Instance Method Details
#mapping(options) ⇒ Object
16 17 18 |
# File 'lib/dozer/mapperable.rb', line 16 def mapping() append_rule(Dozer::Rule.new()) end |
#transform(input) ⇒ Object
20 21 22 23 24 |
# File 'lib/dozer/mapperable.rb', line 20 def transform(input) instance = self.new(input) all_rules.each { |rule| rule.apply!(instance) } instance.output end |