Sha256: 4b4b911bf5f01ff80632eb7d518583ae80e216d318e4d6914f81759863f70463

Contents?: true

Size: 501 Bytes

Versions: 12

Compression:

Stored size: 501 Bytes

Contents

require_relative 'config'

class Commontator::CommontableConfig
  Commontator::Config::COMMONTABLE_ATTRIBUTES.each do |attribute|
    attr_accessor attribute
  end

  # For backwards-compatibility with Integer comments_per_page
  def comments_per_page=(cpp)
    @comments_per_page = [ cpp ].flatten
  end

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

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
commontator-7.0.1 lib/commontator/commontable_config.rb
commontator-7.0.0 lib/commontator/commontable_config.rb
commontator-6.3.2 lib/commontator/commontable_config.rb
commontator-6.3.1 lib/commontator/commontable_config.rb
commontator-6.3.0 lib/commontator/commontable_config.rb
commontator-6.2.1 lib/commontator/commontable_config.rb
commontator-6.2.0 lib/commontator/commontable_config.rb
commontator-6.1.1 lib/commontator/commontable_config.rb
commontator-6.1.0 lib/commontator/commontable_config.rb
commontator-6.0.1 lib/commontator/commontable_config.rb
commontator-6.0.0 lib/commontator/commontable_config.rb
commontator-6.0.0.pre.2 lib/commontator/commontable_config.rb