Class: Representable::Pipeline::Function::Insert
- Inherits:
-
Object
- Object
- Representable::Pipeline::Function::Insert
- Defined in:
- lib/representable/insert.rb
Instance Method Summary collapse
Instance Method Details
#call(arr, func, options) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/representable/insert.rb', line 5 def call(arr, func, ) arr = arr.dup delete!(arr, func) if [:delete] replace!(arr, [:replace], func) if [:replace] arr end |