class Magi::Workspace
Attributes
path[R]
Public Class Methods
new(path)
click to toggle source
# File lib/magi/workspace.rb, line 5 def initialize(path) @path = Pathname.new(path) end
Public Instance Methods
chdir() { || ... }
click to toggle source
# File lib/magi/workspace.rb, line 9 def chdir mkpath_unless_exist Dir.chdir(path) { yield } end
exist?()
click to toggle source
# File lib/magi/workspace.rb, line 22 def exist? path.exist? end
mkpath()
click to toggle source
# File lib/magi/workspace.rb, line 18 def mkpath path.mkpath end
mkpath_unless_exist()
click to toggle source
# File lib/magi/workspace.rb, line 14 def mkpath_unless_exist mkpath unless exist? end