Class: RVM::Environment::EnvWrapper
- Inherits:
-
Object
- Object
- RVM::Environment::EnvWrapper
- Defined in:
- lib/rvm/environment/env.rb
Overview
Simple ruby like wrapper for envs.
Instance Method Summary collapse
-
#contents ⇒ Object
(also: #read, #to_s)
Contents of the env file.
-
#initialize(parent) ⇒ EnvWrapper
constructor
A new instance of EnvWrapper.
-
#path ⇒ Object
The path of the env file.
-
#to_file ⇒ Object
Opens a file on the env file.
Constructor Details
#initialize(parent) ⇒ EnvWrapper
Returns a new instance of EnvWrapper.
28 29 30 |
# File 'lib/rvm/environment/env.rb', line 28 def initialize(parent) @parent = parent end |
Instance Method Details
#contents ⇒ Object Also known as: read, to_s
Contents of the env file.
33 34 35 |
# File 'lib/rvm/environment/env.rb', line 33 def contents @parent.env_contents end |
#path ⇒ Object
The path of the env file.
40 41 42 |
# File 'lib/rvm/environment/env.rb', line 40 def path @parent.env_path end |
#to_file ⇒ Object
Opens a file on the env file.
45 46 47 |
# File 'lib/rvm/environment/env.rb', line 45 def to_file File.open(path) end |