Class: RVM::Environment::EnvWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/rvm/environment/env.rb

Overview

Simple ruby like wrapper for envs.

Instance Method Summary collapse

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

#contentsObject 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

#pathObject

The path of the env file.



40
41
42
# File 'lib/rvm/environment/env.rb', line 40

def path
  @parent.env_path
end

#to_fileObject

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