Class: AdfBuilder::Nodes::Phone
- 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, type: nil, time: nil, preferredcontact: nil) ⇒ Phone
constructor
A new instance of Phone.
Methods inherited from Node
#add_child, #method_missing, #remove_children, #respond_to_missing?, #to_xml
Methods included from Validations
Constructor Details
#initialize(value, type: nil, time: nil, preferredcontact: nil) ⇒ Phone
Returns a new instance of Phone.
25 26 27 28 29 30 31 32 |
# File 'lib/adf_builder/nodes/shared.rb', line 25 def initialize(value, type: nil, time: nil, preferredcontact: nil) super() @tag_name = :phone @value = value @attributes[:type] = type if type @attributes[:time] = time if time @attributes[:preferredcontact] = preferredcontact if preferredcontact end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class AdfBuilder::Nodes::Node