Class: Dimples::Category
- Inherits:
-
Object
- Object
- Dimples::Category
- Defined in:
- lib/dimples/category.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#posts ⇒ Object
Returns the value of attribute posts.
-
#slug ⇒ Object
Returns the value of attribute slug.
Instance Method Summary collapse
-
#initialize(name, slug) ⇒ Category
constructor
A new instance of Category.
Constructor Details
#initialize(name, slug) ⇒ Category
Returns a new instance of Category.
7 8 9 10 11 |
# File 'lib/dimples/category.rb', line 7 def initialize(name, slug) @name = name @slug = slug @posts = [] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/dimples/category.rb', line 3 def name @name end |
#posts ⇒ Object
Returns the value of attribute posts.
5 6 7 |
# File 'lib/dimples/category.rb', line 5 def posts @posts end |
#slug ⇒ Object
Returns the value of attribute slug.
4 5 6 |
# File 'lib/dimples/category.rb', line 4 def slug @slug end |