Class: CIDE::ConfigFileLoader::Path
- Inherits:
-
Object
- Object
- CIDE::ConfigFileLoader::Path
- Defined in:
- lib/cide/config_file_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.
5 6 7 |
# File 'lib/cide/config_file_loader.rb', line 5 def initialize(str) @to_s = str.to_s end |
Instance Attribute Details
#to_s ⇒ Object (readonly)
Returns the value of attribute to_s.
4 5 6 |
# File 'lib/cide/config_file_loader.rb', line 4 def to_s @to_s end |
Instance Method Details
#append(value) ⇒ Object
9 10 11 12 13 |
# File 'lib/cide/config_file_loader.rb', line 9 def append(value) self.class.new( @to_s + (value.is_a?(Integer) ? "[#{value}]" : ".#{value}"), ) end |