class Mapper

Attributes

attributes[R]
transformers[R]

Public Class Methods

new() click to toggle source
# File lib/hash_to_model_mapper.rb, line 100
def initialize
  @transformers = {}
  @attributes = {}
end

Public Instance Methods

method_missing(name, *path, **args, &block) click to toggle source
# File lib/hash_to_model_mapper.rb, line 107
def method_missing(name, *path, **args, &block)
  @transformers[name] = args[:transform]
  @attributes[name] = path.presence || block
end