Class: XForms::FormParser
Constant Summary collapse
- XFORMS_NS =
'http://www.w3.org/2002/xforms'
Instance Method Summary collapse
-
#initialize(input) ⇒ FormParser
constructor
A new instance of FormParser.
- #parse ⇒ Object
Constructor Details
#initialize(input) ⇒ FormParser
Returns a new instance of FormParser.
7 8 9 10 11 |
# File 'lib/xforms/form_parser.rb', line 7 def initialize(input) @reader = Nokogiri::XML::Reader(input) @form = Form.new @bindings = {} end |
Instance Method Details
#parse ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/xforms/form_parser.rb', line 13 def parse while read if is_xforms_element? parse_xforms_element end end @form.recalculate @form end |