Class: AdfBuilder::Nodes::Phone

Inherits:
Node
  • Object
show all
Defined in:
lib/adf_builder/nodes/shared.rb

Instance Attribute Summary

Attributes inherited from Node

#attributes, #children, #tag_name, #value

Instance Method Summary collapse

Methods inherited from Node

#add_child, #method_missing, #remove_children, #respond_to_missing?, #to_xml

Methods included from Validations

included, #validate!

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