Class: ActionSet::Instructions::EntryValue::PlainRubyAdapter
- Inherits:
-
Object
- Object
- ActionSet::Instructions::EntryValue::PlainRubyAdapter
- Defined in:
- lib/action_set/instructions/entry_value.rb
Instance Method Summary collapse
-
#initialize(raw, target) ⇒ PlainRubyAdapter
constructor
A new instance of PlainRubyAdapter.
- #process ⇒ Object
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
#process ⇒ Object
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 |