Class: Representable::ParseStrategy::Sync

Inherits:
Object
  • Object
show all
Defined in:
lib/representable/parse_strategies.rb

Class Method Summary collapse

Class Method Details

.apply!(name, options) ⇒ Object



71
72
73
74
75
76
77
# File 'lib/representable/parse_strategies.rb', line 71

def self.apply!(name, options)
  options[:setter]       = lambda { |*args| }
  options[:pass_options] = true
  options[:instance]     = options[:collection] ?
    lambda { |options| options[:binding].get(options)[options[:index]] } :
    lambda { |options| options[:binding].get(options) }
end