Class: About::CategoryMods
- Inherits:
-
Object
- Object
- About::CategoryMods
- Includes:
- ActiveModel::Serialization
- Defined in:
- app/models/about.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#moderators ⇒ Object
readonly
Returns the value of attribute moderators.
Instance Method Summary collapse
-
#initialize(category, moderators) ⇒ CategoryMods
constructor
A new instance of CategoryMods.
- #parent_category ⇒ Object
Constructor Details
#initialize(category, moderators) ⇒ CategoryMods
Returns a new instance of CategoryMods.
8 9 10 11 |
# File 'app/models/about.rb', line 8 def initialize(category, moderators) @category = category @moderators = moderators end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
6 7 8 |
# File 'app/models/about.rb', line 6 def category @category end |
#moderators ⇒ Object (readonly)
Returns the value of attribute moderators.
6 7 8 |
# File 'app/models/about.rb', line 6 def moderators @moderators end |
Instance Method Details
#parent_category ⇒ Object
13 14 15 |
# File 'app/models/about.rb', line 13 def parent_category category.parent_category end |