Class: ApiBucket::Base::Item

Inherits:
Object
  • Object
show all
Defined in:
lib/api_bucket/base/item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#availablityObject

:Availablity for amazon



15
16
17
# File 'lib/api_bucket/base/item.rb', line 15

def availablity
  @availablity
end

#descriptionObject

:Content



12
13
14
# File 'lib/api_bucket/base/item.rb', line 12

def description
  @description
end

#detail_urlObject

:DetailPageURL



4
5
6
# File 'lib/api_bucket/base/item.rb', line 4

def detail_url
  @detail_url
end

#imageObject

Returns the value of attribute image.



8
9
10
# File 'lib/api_bucket/base/item.rb', line 8

def image
  @image
end

#image_lObject

:ImageL



9
10
11
# File 'lib/api_bucket/base/item.rb', line 9

def image_l
  @image_l
end

#image_mObject

:ImageM



10
11
12
# File 'lib/api_bucket/base/item.rb', line 10

def image_m
  @image_m
end

#image_sObject

:ImageS



11
12
13
# File 'lib/api_bucket/base/item.rb', line 11

def image_s
  @image_s
end

#preview_urlObject

:PreviewURL



5
6
7
# File 'lib/api_bucket/base/item.rb', line 5

def preview_url
  @preview_url
end

#priceObject

:Amount



6
7
8
# File 'lib/api_bucket/base/item.rb', line 6

def price
  @price
end

#product_codeObject

:ASIN



3
4
5
# File 'lib/api_bucket/base/item.rb', line 3

def product_code
  @product_code
end

#release_dateObject

:ReleaseDate



13
14
15
# File 'lib/api_bucket/base/item.rb', line 13

def release_date
  @release_date
end

#titleObject

:Title



7
8
9
# File 'lib/api_bucket/base/item.rb', line 7

def title
  @title
end

Instance Method Details

#adult?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/api_bucket/base/item.rb', line 17

def adult?
  false
end

#hash_allObject



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/api_bucket/base/item.rb', line 21

def hash_all
  @image ||= {}
  %w(l m s).collect {|size| @image[size] ||= {}}
  {
    product_code: @product_code,
    detail_url:   @detail_url,
    preview_url:  @preview_url,
    price:        @price,
    title:        @title,
    image_l:      @image[:l],
    image_m:      @image[:m],
    image_s:      @image[:s],
    description:  @description,
    release_date: @release_date,
    availablity:  @availablity
  }
end