Class: MagicShelf::DirChanger
- Inherits:
-
Object
- Object
- MagicShelf::DirChanger
- Defined in:
- lib/magicshelf/dirchanger.rb
Instance Attribute Summary collapse
-
#workdir ⇒ Object
Returns the value of attribute workdir.
Instance Method Summary collapse
Instance Attribute Details
#workdir ⇒ Object
Returns the value of attribute workdir.
7 8 9 |
# File 'lib/magicshelf/dirchanger.rb', line 7 def workdir @workdir end |
Instance Method Details
#enter ⇒ Object
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 |
#process ⇒ Object
17 18 |
# File 'lib/magicshelf/dirchanger.rb', line 17 def process() end |