Class: AdfBuilder::Nodes::Id
- Defined in:
- lib/adf_builder/nodes/shared.rb
Instance Attribute Summary
Attributes inherited from Node
#attributes, #children, #tag_name, #value
Instance Method Summary collapse
-
#initialize(value, source:, sequence: nil) ⇒ Id
constructor
A new instance of Id.
Methods inherited from Node
#add_child, #method_missing, #remove_children, #respond_to_missing?, #to_xml
Methods included from Validations
Constructor Details
#initialize(value, source:, sequence: nil) ⇒ Id
Returns a new instance of Id.
6 7 8 9 10 11 12 13 14 |
# File 'lib/adf_builder/nodes/shared.rb', line 6 def initialize(value, source:, sequence: nil) super() raise ArgumentError, "Source is required" if source.nil? @tag_name = :id @value = value @attributes[:sequence] = sequence if sequence @attributes[:source] = source end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class AdfBuilder::Nodes::Node