Class: Moo::Model::ImageBasketItem::ImageItem

Inherits:
Object
  • Object
show all
Defined in:
lib/moo/model/image_basket_item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ ImageItem

Returns a new instance of ImageItem.

Yields:

  • (_self)

Yield Parameters:



7
8
9
# File 'lib/moo/model/image_basket_item.rb', line 7

def initialize
  yield self if block_given?
end

Instance Attribute Details

#heightObject

Returns the value of attribute height.



5
6
7
# File 'lib/moo/model/image_basket_item.rb', line 5

def height
  @height
end

#resource_uriObject

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

#rotationObject

Returns the value of attribute rotation.



5
6
7
# File 'lib/moo/model/image_basket_item.rb', line 5

def rotation
  @rotation
end

#typeObject

Returns the value of attribute type.



5
6
7
# File 'lib/moo/model/image_basket_item.rb', line 5

def type
  @type
end

#widthObject

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_hashObject



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_jsonObject



54
55
56
# File 'lib/moo/model/image_basket_item.rb', line 54

def to_json
  to_hash.to_json
end