Class: Moo::Model::ImageBasketItem

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

Defined Under Namespace

Classes: ImageItem

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of ImageBasketItem.

Yields:

  • (_self)

Yield Parameters:



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_idObject

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

#itemsObject

Returns the value of attribute items.



60
61
62
# File 'lib/moo/model/image_basket_item.rb', line 60

def items
  @items
end

#resource_uriObject

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_hashObject



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