Class: Envo::Host

Inherits:
Object
  • Object
show all
Defined in:
lib/envo/host.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(shell) ⇒ Host

Returns a new instance of Host.



3
4
5
# File 'lib/envo/host.rb', line 3

def initialize(shell)
  @shell = shell
end

Instance Attribute Details

#shellObject (readonly)

Returns the value of attribute shell.



6
7
8
# File 'lib/envo/host.rb', line 6

def shell
  @shell
end

Instance Method Details

#envObject



8
9
10
# File 'lib/envo/host.rb', line 8

def env
  ENV
end

#homeObject



16
17
18
# File 'lib/envo/host.rb', line 16

def home
  Dir.home
end

#path_exists?(path) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/envo/host.rb', line 20

def path_exists?(path)
  File.exist?(path)
end

#pwdObject



12
13
14
# File 'lib/envo/host.rb', line 12

def pwd
  Dir.pwd
end