Class: Moo::Model::ImageBasketItem
- Defined in:
- lib/moo/model/image_basket_item.rb
Defined Under Namespace
Classes: ImageItem
Instance Attribute Summary collapse
-
#cache_id ⇒ Object
Returns the value of attribute cache_id.
-
#items ⇒ Object
Returns the value of attribute items.
-
#resource_uri ⇒ Object
Returns the value of attribute resource_uri.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ ImageBasketItem
constructor
A new instance of ImageBasketItem.
- #to_hash ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ ImageBasketItem
Returns a new instance of ImageBasketItem.
62 63 64 |
# File 'lib/moo/model/image_basket_item.rb', line 62 def initialize yield self if block_given? end |
Instance Attribute Details
#cache_id ⇒ Object
Returns the value of attribute cache_id.
59 60 61 |
# File 'lib/moo/model/image_basket_item.rb', line 59 def cache_id @cache_id end |
#items ⇒ Object
Returns the value of attribute items.
60 61 62 |
# File 'lib/moo/model/image_basket_item.rb', line 60 def items @items end |
#resource_uri ⇒ Object
Returns the value of attribute resource_uri.
59 60 61 |
# File 'lib/moo/model/image_basket_item.rb', line 59 def resource_uri @resource_uri end |
Instance Method Details
#to_hash ⇒ Object
76 77 78 79 80 81 82 83 84 85 |
# File 'lib/moo/model/image_basket_item.rb', line 76 def to_hash hash = { :resourceUri => resource_uri, :imageBox => nil, :removable => true, :croppable => true, :cacheId => cache_id, :imageItems => items.map {|i| i.to_hash } } end |