Class: Baha::Workspace

Inherits:
Object
  • Object
show all
Defined in:
lib/baha/workspace.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Workspace

Returns a new instance of Workspace.



7
8
9
10
11
12
13
# File 'lib/baha/workspace.rb', line 7

def initialize(options)
  @options = {}
  @options.merge!(options)
  @directory = @options['directory'] || Dir.pwd
  @mount_dir = @options['mount_dir'] || @directory
  @image = @options['image']
end

Instance Attribute Details

#directoryObject (readonly)

Returns the value of attribute directory.



5
6
7
# File 'lib/baha/workspace.rb', line 5

def directory
  @directory
end

Instance Method Details

#+(file) ⇒ Object



15
16
17
# File 'lib/baha/workspace.rb', line 15

def +(file)
  Pathname.new(@mount_dir) + @image + file
end