Class: Early::DefaultVariable

Inherits:
Object
  • Object
show all
Defined in:
lib/early.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ DefaultVariable

Returns a new instance of DefaultVariable.



43
44
45
46
# File 'lib/early.rb', line 43

def initialize(name, value)
  @name = String(name)
  @value = String(value)
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



41
42
43
# File 'lib/early.rb', line 41

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



41
42
43
# File 'lib/early.rb', line 41

def value
  @value
end

Instance Method Details

#applyObject



48
49
50
# File 'lib/early.rb', line 48

def apply
  ENV[name] ||= value
end