Class: MagicShelf::DirChanger

Inherits:
Object
  • Object
show all
Defined in:
lib/magicshelf/dirchanger.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#workdirObject

Returns the value of attribute workdir.



7
8
9
# File 'lib/magicshelf/dirchanger.rb', line 7

def workdir
  @workdir
end

Instance Method Details

#enterObject



9
10
11
12
13
14
15
# File 'lib/magicshelf/dirchanger.rb', line 9

def enter()
  raise MagicShelf::DirChangerError.new("workdir is not set") if @workdir == nil
  Dir.chdir(@workdir) {|dir|
    MagicShelf.logger.debug("DirChanger: chdir to #{dir}")
    yield
  }
end

#processObject



17
18
# File 'lib/magicshelf/dirchanger.rb', line 17

def process()
end