Class: AppConfigLoader::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/app_config_loader/parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(use_domain = false) ⇒ Parser

Returns a new instance of Parser.



5
6
7
# File 'lib/app_config_loader/parser.rb', line 5

def initialize(use_domain = false)
  @use_domain = use_domain
end

Instance Method Details

#parse(content) ⇒ Object

Parse a YAML format text and returns flattened list of all key entries



12
13
14
# File 'lib/app_config_loader/parser.rb', line 12

def parse(content)
  flatten_keys YAML.load(content)
end