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.



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

def initialize(parent)
  @parent = parent
end

Instance Method Details

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

#pathObject

The path of the env file.



53
54
55
# File 'lib/rvm/environment/env.rb', line 53

def path
  @parent.env_path
end

#to_fileObject

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