Class: ActionSet::Instructions::EntryValue::PlainRubyAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/action_set/instructions/entry_value.rb

Instance Method Summary collapse

Constructor Details

#initialize(raw, target) ⇒ PlainRubyAdapter

Returns a new instance of PlainRubyAdapter.



26
27
28
29
# File 'lib/action_set/instructions/entry_value.rb', line 26

def initialize(raw, target)
  @raw = raw
  @target = target
end

Instance Method Details

#processObject



31
32
33
34
# File 'lib/action_set/instructions/entry_value.rb', line 31

def process
  return @raw if @raw.is_a? @target
  possible_values.find { |v| v.is_a? @target }
end