Class: Moo::Model::ImageBasketItem::ImageItem
- Defined in:
- lib/moo/model/image_basket_item.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#resource_uri ⇒ Object
Returns the value of attribute resource_uri.
-
#rotation ⇒ Object
Returns the value of attribute rotation.
-
#type ⇒ Object
Returns the value of attribute type.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ ImageItem
constructor
A new instance of ImageItem.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize {|_self| ... } ⇒ ImageItem
Returns a new instance of ImageItem.
7 8 9 |
# File 'lib/moo/model/image_basket_item.rb', line 7 def initialize yield self if block_given? end |
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
5 6 7 |
# File 'lib/moo/model/image_basket_item.rb', line 5 def height @height end |
#resource_uri ⇒ Object
Returns the value of attribute resource_uri.
5 6 7 |
# File 'lib/moo/model/image_basket_item.rb', line 5 def resource_uri @resource_uri end |
#rotation ⇒ Object
Returns the value of attribute rotation.
5 6 7 |
# File 'lib/moo/model/image_basket_item.rb', line 5 def rotation @rotation end |
#type ⇒ Object
Returns the value of attribute type.
5 6 7 |
# File 'lib/moo/model/image_basket_item.rb', line 5 def type @type end |
#width ⇒ Object
Returns the value of attribute width.
5 6 7 |
# File 'lib/moo/model/image_basket_item.rb', line 5 def width @width end |
Instance Method Details
#to_hash ⇒ Object
44 45 46 47 48 49 50 51 52 |
# File 'lib/moo/model/image_basket_item.rb', line 44 def to_hash hash = { :resourceUri => resource_uri, :type => type, :width => width, :height => height, :rotation => rotation } end |
#to_json ⇒ Object
54 55 56 |
# File 'lib/moo/model/image_basket_item.rb', line 54 def to_json to_hash.to_json end |