Class: SoftwareBinder::Software
- Inherits:
-
Object
- Object
- SoftwareBinder::Software
- Defined in:
- lib/software_binder/software.rb
Constant Summary collapse
- @@all =
[]
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
-
#overall_rating ⇒ Object
Returns the value of attribute overall_rating.
-
#page_slug ⇒ Object
Returns the value of attribute page_slug.
-
#reviews ⇒ Object
Returns the value of attribute reviews.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(category) ⇒ Software
constructor
A new instance of Software.
- #save ⇒ Object
Constructor Details
#initialize(category) ⇒ Software
Returns a new instance of Software.
7 8 9 10 |
# File 'lib/software_binder/software.rb', line 7 def initialize(category) @category = category self.save end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
3 4 5 |
# File 'lib/software_binder/software.rb', line 3 def category @category end |
#description ⇒ Object
Returns the value of attribute description.
2 3 4 |
# File 'lib/software_binder/software.rb', line 2 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/software_binder/software.rb', line 2 def name @name end |
#overall_rating ⇒ Object
Returns the value of attribute overall_rating.
2 3 4 |
# File 'lib/software_binder/software.rb', line 2 def end |
#page_slug ⇒ Object
Returns the value of attribute page_slug.
2 3 4 |
# File 'lib/software_binder/software.rb', line 2 def page_slug @page_slug end |
#reviews ⇒ Object
Returns the value of attribute reviews.
2 3 4 |
# File 'lib/software_binder/software.rb', line 2 def reviews @reviews end |
Class Method Details
.all ⇒ Object
16 17 18 |
# File 'lib/software_binder/software.rb', line 16 def self.all @@all end |
.reset ⇒ Object
20 21 22 |
# File 'lib/software_binder/software.rb', line 20 def self.reset @@all.clear end |
Instance Method Details
#save ⇒ Object
12 13 14 |
# File 'lib/software_binder/software.rb', line 12 def save @@all << self end |