Class: AdfBuilder::Nodes::Amount
- 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
-
#initialize(value, type: :total, limit: :maximum, currency: nil) ⇒ Amount
constructor
A new instance of Amount.
Methods inherited from Node
#add_child, #method_missing, #remove_children, #respond_to_missing?, #to_xml
Methods included from Validations
Constructor Details
#initialize(value, type: :total, limit: :maximum, currency: nil) ⇒ Amount
Returns a new instance of Amount.
103 104 105 106 107 108 109 110 |
# File 'lib/adf_builder/nodes/vehicle_nodes.rb', line 103 def initialize(value, type: :total, limit: :maximum, currency: nil) super() @tag_name = :amount @value = value @attributes[:type] = type @attributes[:limit] = limit @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