Method: Lines#parse

Defined in:
lib/lines.rb

#parse(source, options = {}) ⇒ Object

Parse the Lines string source into a Ruby data structure and return it.

options can have the following keys:

  • symbolize_names: If set to true, returns symbols for the names (keys) in a Lines object. Otherwise strings are returned. Strings are the default.



37
38
39
40
# File 'lib/lines.rb', line 37

def parse(source, options = {})
  opts = Lines.parse_default_options.merge(options.to_hash)
  @parser.parse(source.to_str, opts)
end