module CfScript::Output::Parser::Section

Public Instance Methods

extract_section(buffer, header) click to toggle source
# 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) click to toggle source
# 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