Class: Overapp::Load::Instance

Inherits:
Object
  • Object
show all
Includes:
FromHash
Defined in:
lib/overapp/load/instance.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#overlaysObject

Returns the value of attribute overlays.



5
6
7
# File 'lib/overapp/load/instance.rb', line 5

def overlays
  @overlays
end

#pathObject

Returns the value of attribute path.



5
6
7
# File 'lib/overapp/load/instance.rb', line 5

def path
  @path
end

Instance Method Details

#apply_overlay(base, overlay) ⇒ Object



26
27
28
29
30
31
32
# File 'lib/overapp/load/instance.rb', line 26

def apply_overlay(base,overlay)
  Overapp::Git.commit(path,overlay.commit_message) do
    overlay.apply_to(base, :path => path).tap do |res|
      res.write_to! path
    end
  end.tap { |res| raise "nil return" unless res }
end