Class: App

Inherits:
Object
  • Object
show all
Defined in:
lib/top_free_apps_itunes/app.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, url) ⇒ App

Returns a new instance of App.



6
7
8
9
10
# File 'lib/top_free_apps_itunes/app.rb', line 6

def initialize(title, url)
    @title = title
    @url = url
    @@all << self
end

Instance Attribute Details

#categoryObject

Returns the value of attribute category.



3
4
5
# File 'lib/top_free_apps_itunes/app.rb', line 3

def category
  @category
end

#developerObject

Returns the value of attribute developer.



3
4
5
# File 'lib/top_free_apps_itunes/app.rb', line 3

def developer
  @developer
end

#languageObject

Returns the value of attribute language.



3
4
5
# File 'lib/top_free_apps_itunes/app.rb', line 3

def language
  @language
end

#ratingObject

Returns the value of attribute rating.



3
4
5
# File 'lib/top_free_apps_itunes/app.rb', line 3

def rating
  @rating
end

#sizeObject

Returns the value of attribute size.



3
4
5
# File 'lib/top_free_apps_itunes/app.rb', line 3

def size
  @size
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/top_free_apps_itunes/app.rb', line 3

def title
  @title
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/top_free_apps_itunes/app.rb', line 3

def url
  @url
end

Class Method Details

.allObject



12
13
14
# File 'lib/top_free_apps_itunes/app.rb', line 12

def self.all
    @@all
end