Class: MobileStores::App
- Inherits:
-
Object
- Object
- MobileStores::App
- Defined in:
- lib/mobile_stores/app.rb
Class Attribute Summary collapse
-
.store ⇒ Object
Returns the value of attribute store.
Instance Attribute Summary collapse
-
#application_id ⇒ Object
Returns the value of attribute application_id.
-
#category ⇒ Object
Returns the value of attribute category.
-
#compatibility ⇒ Object
Returns the value of attribute compatibility.
-
#creator_id ⇒ Object
Returns the value of attribute creator_id.
-
#creator_name ⇒ Object
Returns the value of attribute creator_name.
-
#description ⇒ Object
Returns the value of attribute description.
-
#icon_url ⇒ Object
Returns the value of attribute icon_url.
-
#price ⇒ Object
Returns the value of attribute price.
-
#rating ⇒ Object
Returns the value of attribute rating.
-
#screenshot_urls ⇒ Object
Returns the value of attribute screenshot_urls.
-
#title ⇒ Object
Returns the value of attribute title.
-
#version ⇒ Object
Returns the value of attribute version.
-
#view_url ⇒ Object
Returns the value of attribute view_url.
Class Method Summary collapse
-
.amazon_marketplace ⇒ Object
Selects BlackBerry World Store for further manipulations.
-
.app_store ⇒ Object
Selects Apple AppStore for further manipulations.
-
.blackberry_world ⇒ Object
Selects BlackBerry World Store for further manipulations.
-
.google_play ⇒ Object
Selects Google Play Store for further manipulations.
-
.in(store) ⇒ Object
Selects the store for further manipulations.
-
.windows_store ⇒ Object
Selects Windows Store for further manipulations.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ App
constructor
A new instance of App.
Constructor Details
#initialize(hash = {}) ⇒ App
Returns a new instance of App.
6 7 8 9 10 |
# File 'lib/mobile_stores/app.rb', line 6 def initialize(hash = {}) hash.each_pair do |key, value| self.send "#{ key }=", value end end |
Class Attribute Details
.store ⇒ Object
Returns the value of attribute store.
13 14 15 |
# File 'lib/mobile_stores/app.rb', line 13 def store @store end |
Instance Attribute Details
#application_id ⇒ Object
Returns the value of attribute application_id.
4 5 6 |
# File 'lib/mobile_stores/app.rb', line 4 def application_id @application_id end |
#category ⇒ Object
Returns the value of attribute category.
4 5 6 |
# File 'lib/mobile_stores/app.rb', line 4 def category @category end |
#compatibility ⇒ Object
Returns the value of attribute compatibility.
4 5 6 |
# File 'lib/mobile_stores/app.rb', line 4 def compatibility @compatibility end |
#creator_id ⇒ Object
Returns the value of attribute creator_id.
4 5 6 |
# File 'lib/mobile_stores/app.rb', line 4 def creator_id @creator_id end |
#creator_name ⇒ Object
Returns the value of attribute creator_name.
4 5 6 |
# File 'lib/mobile_stores/app.rb', line 4 def creator_name @creator_name end |
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/mobile_stores/app.rb', line 4 def description @description end |
#icon_url ⇒ Object
Returns the value of attribute icon_url.
4 5 6 |
# File 'lib/mobile_stores/app.rb', line 4 def icon_url @icon_url end |
#price ⇒ Object
Returns the value of attribute price.
4 5 6 |
# File 'lib/mobile_stores/app.rb', line 4 def price @price end |
#rating ⇒ Object
Returns the value of attribute rating.
4 5 6 |
# File 'lib/mobile_stores/app.rb', line 4 def @rating end |
#screenshot_urls ⇒ Object
Returns the value of attribute screenshot_urls.
4 5 6 |
# File 'lib/mobile_stores/app.rb', line 4 def screenshot_urls @screenshot_urls end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/mobile_stores/app.rb', line 4 def title @title end |
#version ⇒ Object
Returns the value of attribute version.
4 5 6 |
# File 'lib/mobile_stores/app.rb', line 4 def version @version end |
#view_url ⇒ Object
Returns the value of attribute view_url.
4 5 6 |
# File 'lib/mobile_stores/app.rb', line 4 def view_url @view_url end |
Class Method Details
.amazon_marketplace ⇒ Object
Selects BlackBerry World Store for further manipulations.
54 55 56 |
# File 'lib/mobile_stores/app.rb', line 54 def amazon_marketplace self.in(AmazonMarketplace) end |
.app_store ⇒ Object
Selects Apple AppStore for further manipulations.
34 35 36 |
# File 'lib/mobile_stores/app.rb', line 34 def app_store self.in(AppStore) end |
.blackberry_world ⇒ Object
Selects BlackBerry World Store for further manipulations.
49 50 51 |
# File 'lib/mobile_stores/app.rb', line 49 def blackberry_world self.in(BlackBerryWorld) end |
.google_play ⇒ Object
Selects Google Play Store for further manipulations.
39 40 41 |
# File 'lib/mobile_stores/app.rb', line 39 def google_play self.in(GooglePlay) end |
.in(store) ⇒ Object
Selects the store for further manipulations.
App.in(:app_store)
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/mobile_stores/app.rb', line 19 def in(store) store_class = if store.is_a? Symbol MobileStores::STORES[store] elsif store.is_a? String Object.const_get(store) rescue nil elsif store.is_a? Class store end raise NotImplementedError, "#{ store } is not implemented yet." if store.nil? store_class.new end |
.windows_store ⇒ Object
Selects Windows Store for further manipulations.
44 45 46 |
# File 'lib/mobile_stores/app.rb', line 44 def windows_store self.in(WindowsStore) end |