Class: SimpleConfig

Inherits:
Kvx
  • Object
show all
Defined in:
lib/simple-config.rb

Instance Method Summary collapse

Constructor Details

#initialize(x, attributes: {}, auto_detect_type: true, comment_char: '#', debug: false) ⇒ SimpleConfig

Returns a new instance of SimpleConfig.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/simple-config.rb', line 11

def initialize(x, attributes: {}, auto_detect_type: true, comment_char: '#', 
               debug: false)  

  @ignore_blank_lines = true
  @auto_detect_type = auto_detect_type
  
  if x.is_a? SimpleConfig then
    @to_h = x.to_h
  elsif x
    super(x, attributes: attributes, comment_char: comment_char, debug: debug)
  end
  
  @identifier = 'simple-config'    
  
end