Class: AdfBuilder::Nodes::Balance

Inherits:
Node
  • Object
show all
Defined in:
lib/adf_builder/nodes/vehicle_nodes.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: :finance, currency: nil) ⇒ Balance

Returns a new instance of Balance.



117
118
119
120
121
122
123
# File 'lib/adf_builder/nodes/vehicle_nodes.rb', line 117

def initialize(value, type: :finance, currency: nil)
  super()
  @tag_name = :balance
  @value = value
  @attributes[:type] = type
  @attributes[:currency] = currency if currency
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class AdfBuilder::Nodes::Node