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.
41 42 43 |
# File 'lib/rvm/environment/env.rb', line 41 def initialize(parent) @parent = parent end |
Instance Method Details
#contents ⇒ Object Also known as: read, to_s
Contents of the env file.
46 47 48 |
# File 'lib/rvm/environment/env.rb', line 46 def contents @parent.env_contents end |
#path ⇒ Object
The path of the env file.
53 54 55 |
# File 'lib/rvm/environment/env.rb', line 53 def path @parent.env_path end |
#to_file ⇒ Object
Opens a file on the env file.
58 59 60 |
# File 'lib/rvm/environment/env.rb', line 58 def to_file File.open(path) end |