Method: Conf::Configuration#section
- Defined in:
- lib/conf.rb
#section(start_key) ⇒ Object
138 139 140 141 142 143 144 145 146 147 |
# File 'lib/conf.rb', line 138 def section(start_key) result = @parent ? @parent.section(start_key) : {} rx = /^#{Regexp.escape(start_key).gsub("\\*", ".+?")}/ @data.each do |key, value| result[key] = value if key =~ rx and not value.instance_of? Object end result end |