Class: CIDE::Build::ConfigLoader::Path

Inherits:
Object
  • Object
show all
Defined in:
lib/cide/build/config_loader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_sObject (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