Class: ActionSet::Instructions::EntryValue::ActiveModelAdapter
- Inherits:
-
Object
- Object
- ActionSet::Instructions::EntryValue::ActiveModelAdapter
- Defined in:
- lib/action_set/instructions/entry_value.rb
Instance Method Summary collapse
-
#initialize(raw, target) ⇒ ActiveModelAdapter
constructor
A new instance of ActiveModelAdapter.
- #process ⇒ Object
Constructor Details
#initialize(raw, target) ⇒ ActiveModelAdapter
Returns a new instance of ActiveModelAdapter.
64 65 66 67 |
# File 'lib/action_set/instructions/entry_value.rb', line 64 def initialize(raw, target) @raw = raw @target = target end |
Instance Method Details
#process ⇒ Object
69 70 71 72 |
# File 'lib/action_set/instructions/entry_value.rb', line 69 def process return @raw if @raw.is_a? @target possible_values.find { |v| v.is_a? @target } end |