Class: Gnomika::Subcategory
- Inherits:
-
Object
- Object
- Gnomika::Subcategory
- Defined in:
- lib/gnomikologikon/category.rb
Overview
A quote subcategory. Has a name and a URL to the quotes page.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#quotes ⇒ Object
readonly
Returns the value of attribute quotes.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(subcategory_name, subcategory_url) ⇒ Subcategory
constructor
A new instance of Subcategory.
Constructor Details
#initialize(subcategory_name, subcategory_url) ⇒ Subcategory
Returns a new instance of Subcategory.
25 26 27 28 |
# File 'lib/gnomikologikon/category.rb', line 25 def initialize(subcategory_name, subcategory_url) @name = subcategory_name @url = subcategory_url end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
20 21 22 |
# File 'lib/gnomikologikon/category.rb', line 20 def name @name end |
#quotes ⇒ Object (readonly)
Returns the value of attribute quotes.
20 21 22 |
# File 'lib/gnomikologikon/category.rb', line 20 def quotes @quotes end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
20 21 22 |
# File 'lib/gnomikologikon/category.rb', line 20 def url @url end |
Instance Method Details
#==(other) ⇒ Object
30 31 32 |
# File 'lib/gnomikologikon/category.rb', line 30 def ==(other) self.name == other.name end |