Class: Fig::Package::Set

Inherits:
Object
  • Object
show all
Includes:
Statement
Defined in:
lib/fig/package/set.rb

Overview

A statement that sets the value of an environment variable.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Statement

#urls, #walk_statements

Constructor Details

#initialize(name, value) ⇒ Set

Returns a new instance of Set.



14
15
16
17
# File 'lib/fig/package/set.rb', line 14

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



12
13
14
# File 'lib/fig/package/set.rb', line 12

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



12
13
14
# File 'lib/fig/package/set.rb', line 12

def value
  @value
end

Instance Method Details

#unparse(indent) ⇒ Object



19
20
21
# File 'lib/fig/package/set.rb', line 19

def unparse(indent)
  "#{indent}set #{name}=#{value}"
end