Class: DailyTrending::App
- Inherits:
-
Object
- Object
- DailyTrending::App
- Defined in:
- lib/daily_trending/app.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#con_rating ⇒ Object
Returns the value of attribute con_rating.
-
#description ⇒ Object
Returns the value of attribute description.
-
#dev ⇒ Object
Returns the value of attribute dev.
-
#dev_url ⇒ Object
Returns the value of attribute dev_url.
-
#genre ⇒ Object
Returns the value of attribute genre.
-
#price ⇒ Object
Returns the value of attribute price.
-
#rate_cnt ⇒ Object
Returns the value of attribute rate_cnt.
-
#rating ⇒ Object
Returns the value of attribute rating.
-
#title ⇒ Object
Returns the value of attribute title.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#app_url ⇒ Object
Returns the value of attribute app_url.
2 3 4 |
# File 'lib/daily_trending/app.rb', line 2 def app_url @app_url end |
#con_rating ⇒ Object
Returns the value of attribute con_rating.
2 3 4 |
# File 'lib/daily_trending/app.rb', line 2 def @con_rating end |
#description ⇒ Object
Returns the value of attribute description.
2 3 4 |
# File 'lib/daily_trending/app.rb', line 2 def description @description end |
#dev ⇒ Object
Returns the value of attribute dev.
2 3 4 |
# File 'lib/daily_trending/app.rb', line 2 def dev @dev end |
#dev_url ⇒ Object
Returns the value of attribute dev_url.
2 3 4 |
# File 'lib/daily_trending/app.rb', line 2 def dev_url @dev_url end |
#genre ⇒ Object
Returns the value of attribute genre.
2 3 4 |
# File 'lib/daily_trending/app.rb', line 2 def genre @genre end |
#price ⇒ Object
Returns the value of attribute price.
2 3 4 |
# File 'lib/daily_trending/app.rb', line 2 def price @price end |
#rate_cnt ⇒ Object
Returns the value of attribute rate_cnt.
2 3 4 |
# File 'lib/daily_trending/app.rb', line 2 def rate_cnt @rate_cnt end |
#rating ⇒ Object
Returns the value of attribute rating.
2 3 4 |
# File 'lib/daily_trending/app.rb', line 2 def @rating end |
#title ⇒ Object
Returns the value of attribute title.
2 3 4 |
# File 'lib/daily_trending/app.rb', line 2 def title @title end |
Class Method Details
.all ⇒ Object
6 7 8 |
# File 'lib/daily_trending/app.rb', line 6 def self.all @@all end |
.find(input) ⇒ Object
11 12 13 |
# File 'lib/daily_trending/app.rb', line 11 def self.find(input) @@all[input.to_i-1] end |
Instance Method Details
#exist? ⇒ Boolean
16 17 18 |
# File 'lib/daily_trending/app.rb', line 16 def exist? self.class.all.any?{|ap| ap.title == self.title} end |
#open_in_browser ⇒ Object
25 26 27 |
# File 'lib/daily_trending/app.rb', line 25 def open_in_browser system("open '#{app_url}'") end |
#save ⇒ Object
21 22 23 |
# File 'lib/daily_trending/app.rb', line 21 def save @@all << self end |