Class: Envo::Host
- Inherits:
-
Object
- Object
- Envo::Host
- Defined in:
- lib/envo/host.rb
Instance Attribute Summary collapse
-
#shell ⇒ Object
readonly
Returns the value of attribute shell.
Instance Method Summary collapse
- #env ⇒ Object
- #home ⇒ Object
-
#initialize(shell) ⇒ Host
constructor
A new instance of Host.
- #path_exists?(path) ⇒ Boolean
- #pwd ⇒ Object
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
#shell ⇒ Object (readonly)
Returns the value of attribute shell.
6 7 8 |
# File 'lib/envo/host.rb', line 6 def shell @shell end |
Instance Method Details
#env ⇒ Object
8 9 10 |
# File 'lib/envo/host.rb', line 8 def env ENV end |
#home ⇒ Object
16 17 18 |
# File 'lib/envo/host.rb', line 16 def home Dir.home end |
#path_exists?(path) ⇒ Boolean
20 21 22 |
# File 'lib/envo/host.rb', line 20 def path_exists?(path) File.exist?(path) end |
#pwd ⇒ Object
12 13 14 |
# File 'lib/envo/host.rb', line 12 def pwd Dir.pwd end |