Class: Cmxl::Fields::Reference
- Inherits:
-
Cmxl::Field
- Object
- Cmxl::Field
- Cmxl::Fields::Reference
- Defined in:
- lib/cmxl/fields/reference.rb
Constant Summary
Constants inherited from Cmxl::Field
Instance Attribute Summary
Attributes inherited from Cmxl::Field
#data, #match, #modifier, #source, #tag
Instance Method Summary collapse
Methods inherited from Cmxl::Field
#add_meta_data, #initialize, #method_missing, parse, parsers, #to_amount, #to_amount_in_cents, #to_date, #to_hash, #to_json
Constructor Details
This class inherits a constructor from Cmxl::Field
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Cmxl::Field
Instance Method Details
#date ⇒ Object
11 12 13 |
# File 'lib/cmxl/fields/reference.rb', line 11 def date to_date(data['date']) end |
#reference ⇒ Object
7 8 9 |
# File 'lib/cmxl/fields/reference.rb', line 7 def reference source end |
#to_h ⇒ Object
15 16 17 |
# File 'lib/cmxl/fields/reference.rb', line 15 def to_h super.merge('date' => date, 'reference' => source) end |