Class: About::CategoryMods

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Serialization
Defined in:
app/models/about.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#categoryObject (readonly)

Returns the value of attribute category.



6
7
8
# File 'app/models/about.rb', line 6

def category
  @category
end

#moderatorsObject (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_categoryObject



13
14
15
# File 'app/models/about.rb', line 13

def parent_category
  category.parent_category
end