Class: XForms::Form

Inherits:
Object show all
Defined in:
lib/xforms/form.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeForm

Returns a new instance of Form.



8
9
10
11
# File 'lib/xforms/form.rb', line 8

def initialize
  @controls = []
  @namespaces = {}
end

Instance Attribute Details

#controlsObject

Returns the value of attribute controls.



5
6
7
# File 'lib/xforms/form.rb', line 5

def controls
  @controls
end

#itextObject

Returns the value of attribute itext.



4
5
6
# File 'lib/xforms/form.rb', line 4

def itext
  @itext
end

#model_instanceObject

Returns the value of attribute model_instance.



3
4
5
# File 'lib/xforms/form.rb', line 3

def model_instance
  @model_instance
end

#namespacesObject

Returns the value of attribute namespaces.



6
7
8
# File 'lib/xforms/form.rb', line 6

def namespaces
  @namespaces
end

Class Method Details

.parse(input) ⇒ Object



19
20
21
# File 'lib/xforms/form.rb', line 19

def self.parse(input)
  FormParser.new(input).parse
end

.parse_file(path) ⇒ Object



13
14
15
16
17
# File 'lib/xforms/form.rb', line 13

def self.parse_file(path)
  File.open(path, 'r') do |f|
    parse f
  end
end