Class: EME::Billing::Item
- Inherits:
-
ObjectHash
- Object
- Hash
- ObjectHash
- EME::Billing::Item
- Defined in:
- lib/eme/billing.rb
Instance Method Summary collapse
-
#initialize(key_values) ⇒ Item
constructor
A new instance of Item.
Methods inherited from ObjectHash
Constructor Details
#initialize(key_values) ⇒ Item
Returns a new instance of Item.
445 446 447 448 449 450 451 452 453 454 455 |
# File 'lib/eme/billing.rb', line 445 def initialize(key_values) key_values.each do |k,v| self[k.to_sym] = v end if self[:images] local_images = [] self[:images].each {|image| local_images << Image.new(image)} self[:images] = local_images end EME::Billing.items[self[:id]] = self end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class EME::Billing::ObjectHash