Class: Commontator::CommontableConfig
- Inherits:
-
Object
- Object
- Commontator::CommontableConfig
- Defined in:
- lib/commontator/commontable_config.rb
Instance Method Summary collapse
-
#comments_per_page=(cpp) ⇒ Object
For backwards-compatibility with Integer comments_per_page.
-
#initialize(options = {}) ⇒ CommontableConfig
constructor
A new instance of CommontableConfig.
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( = {}) Commontator::Config::COMMONTABLE_ATTRIBUTES.each do |attribute| send "#{attribute}=", [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 |