Class: Fig::Package::Path

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

Overview

A statement that specifies or modifies a path environment variable, e.g. “append”, “path”, “add” (though those are all synonyms).

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Statement

#urls, #walk_statements

Constructor Details

#initialize(name, value) ⇒ Path

Returns a new instance of Path.



15
16
17
18
# File 'lib/fig/package/path.rb', line 15

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



13
14
15
# File 'lib/fig/package/path.rb', line 13

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



13
14
15
# File 'lib/fig/package/path.rb', line 13

def value
  @value
end

Instance Method Details

#unparse(indent) ⇒ Object



20
21
22
# File 'lib/fig/package/path.rb', line 20

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