Class: Representable::ParseStrategy::Proc

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

Overview

Using a lambda as parse_strategy does not set the parsed property for you.

Class Method Summary collapse

Class Method Details

.apply!(name, options) ⇒ Object


26
27
28
29
30
# File 'lib/representable/parse_strategies.rb', line 26

def self.apply!(name, options)
  options[:setter]       = lambda { |*| }
  options[:pass_options] = true
  options[:instance]     = options[:parse_strategy]
end