Method: FormatEngine::Engine#do_parse

Defined in:
lib/format_engine/engine.rb

#do_parse(src, dst, parse_spec_str) ⇒ Object

Do the actual work of parsing the formatted input.
Parameters

  • src - The source string being parsed.

  • dst - The class of the object being created.

  • parse_spec_str - The format specification string.



51
52
53
54
55
56
57
58
59
60
# File 'lib/format_engine/engine.rb', line 51

def do_parse(src, dst, parse_spec_str)
  spec_info = SpecInfo.new(src, dst, self)

  due_process(spec_info, parse_spec_str) do |format|
    spec_info.do_parse(format)
  end

ensure
  @unparsed = spec_info.src
end