Class: Commontator::CommontableConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/commontator/commontable_config.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ CommontableConfig

Returns a new instance of CommontableConfig.



13
14
15
16
17
# File 'lib/commontator/commontable_config.rb', line 13

def initialize(options = {})
  Commontator::Config::COMMONTABLE_ATTRIBUTES.each do |attribute|
    send "#{attribute}=", options[attribute] || Commontator.send(attribute)
  end
end

Instance Method Details

#comments_per_page=(cpp) ⇒ Object

For backwards-compatibility with Integer comments_per_page



9
10
11
# File 'lib/commontator/commontable_config.rb', line 9

def comments_per_page=(cpp)
  @comments_per_page = [ cpp ].flatten
end