class Fried::Test::Directory::CurrentWorkingDirectory

Attributes

dir[RW]

Public Class Methods

build() click to toggle source
# File lib/fried/test/directory/current_working_directory.rb, line 25
def self.build
  new.tap do |instance|
    instance.dir = Dir
  end
end
call() click to toggle source
# File lib/fried/test/directory/current_working_directory.rb, line 39
def self.call
  instance = build
  instance.()
end

Public Instance Methods

call() click to toggle source

@return [Pathname]

# File lib/fried/test/directory/current_working_directory.rb, line 32
def call
  return Pathname.new("/dev/null") if dir.nil?

  path_as_text = dir.pwd
  Pathname.new(path_as_text)
end