Module: CfScript::Output::Parser::Section
- Included in:
- CfScript::Output::Parser
- Defined in:
- lib/cf_script/output/parser/section.rb
Instance Method Summary collapse
Instance Method Details
#extract_section(buffer, header) ⇒ Object
3 4 5 6 7 |
# File 'lib/cf_script/output/parser/section.rb', line 3 def extract_section(buffer, header) if match = buffer.match(/^#{header}:?\s*\n(.*?)\n\n/m) match[1] end end |
#parse_section_attributes(buffer, header) ⇒ Object
9 10 11 12 13 |
# File 'lib/cf_script/output/parser/section.rb', line 9 def parse_section_attributes(buffer, header) if section = extract_section(buffer, header) parse_attribute_list(section, false) end end |