class Layer::Patch::Base

Attributes

patch[R]

Public Class Methods

new(patch, object) click to toggle source
Calls superclass method
# File lib/layer/patch/base.rb, line 7
def initialize(patch, object)
  @patch = patch
  super(prepare_base(object))
end

Public Instance Methods

wrap(property, object) click to toggle source
# File lib/layer/patch/base.rb, line 12
def wrap(property, object)
  case object
  when ::Array
    return Layer::Patch::Array.new(patch.nested(property), object)
  when ::Hash
    return Layer::Patch::Hash.new(patch.nested(property), object)
  else
    object
  end
end