Class: AdfBuilder::Id
- Inherits:
-
Object
- Object
- AdfBuilder::Id
- Defined in:
- lib/adf_builder/shared/id.rb
Instance Method Summary collapse
-
#add(parent_node, value, source = nil, sequence = 1) ⇒ Object
add id tag to the form.
-
#initialize ⇒ Id
constructor
A new instance of Id.
Constructor Details
#initialize ⇒ Id
Returns a new instance of Id.
3 4 5 |
# File 'lib/adf_builder/shared/id.rb', line 3 def initialize end |
Instance Method Details
#add(parent_node, value, source = nil, sequence = 1) ⇒ Object
add id tag to the form
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/adf_builder/shared/id.rb', line 8 def add(parent_node, value, source=nil, sequence=1) id_node = Ox::Element.new('id') id_node << value id_node[:sequence] = sequence if source id_node[:source] = source end parent_node.prepend_child(id_node) end |