Class: CheckoutRu::Item

Inherits:
Entity
  • Object
show all
Defined in:
lib/checkout_ru/item.rb

Class Method Summary collapse

Methods inherited from Entity

#to_json

Class Method Details

.coerce(value) ⇒ Object



6
7
8
9
10
# File 'lib/checkout_ru/item.rb', line 6

def coerce(value)
  value.is_a?(Array) ?
    value.map{ |hash| new(hash) } :
    new(value)
end