Class: CIDE::Build::ConfigLoader::Path
- Inherits:
-
Object
- Object
- CIDE::Build::ConfigLoader::Path
- Defined in:
- lib/cide/build/config_loader.rb
Instance Attribute Summary collapse
-
#to_s ⇒ Object
readonly
Returns the value of attribute to_s.
Instance Method Summary collapse
- #append(value) ⇒ Object
-
#initialize(str) ⇒ Path
constructor
A new instance of Path.
Constructor Details
#initialize(str) ⇒ Path
Returns a new instance of Path.
6 7 8 |
# File 'lib/cide/build/config_loader.rb', line 6 def initialize(str) @to_s = str.to_s end |
Instance Attribute Details
#to_s ⇒ Object (readonly)
Returns the value of attribute to_s.
5 6 7 |
# File 'lib/cide/build/config_loader.rb', line 5 def to_s @to_s end |
Instance Method Details
#append(value) ⇒ Object
10 11 12 13 14 |
# File 'lib/cide/build/config_loader.rb', line 10 def append(value) self.class.new( @to_s + (value.is_a?(Integer) ? "[#{value}]" : ".#{value}"), ) end |