Class: Trax::Core::FS::CurrentWorkingDirectory

Inherits:
SimpleDelegator
  • Object
show all
Includes:
Enumerable
Defined in:
lib/trax/core/fs.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Enumerable

#group_by_count

Constructor Details

#initializeCurrentWorkingDirectory

Returns a new instance of CurrentWorkingDirectory.



189
190
191
192
# File 'lib/trax/core/fs.rb', line 189

def initialize
  @path = ::Pathname.new(::Dir.pwd)
  @directory = ::Trax::Core::FS::Directory.new(@path)
end

Instance Attribute Details

#directoryObject

Returns the value of attribute directory.



187
188
189
# File 'lib/trax/core/fs.rb', line 187

def directory
  @directory
end

#pathObject

Returns the value of attribute path.



187
188
189
# File 'lib/trax/core/fs.rb', line 187

def path
  @path
end

Instance Method Details

#__getobj__Object



194
195
196
# File 'lib/trax/core/fs.rb', line 194

def __getobj__
  @directory
end

#each {|@directory| ... } ⇒ Object

Yields:



198
199
200
# File 'lib/trax/core/fs.rb', line 198

def each
  yield @directory
end