Sha256: 021fe47131d13ee0e5a529503f43686f7ebd153622b141edaa101023b4459d71

Contents?: true

Size: 643 Bytes

Versions: 3

Compression:

Stored size: 643 Bytes

Contents

module TheComments
  def self.configure(&block)
    yield @config ||= TheComments::Configuration.new
  end

  def self.config
    @config
  end

  # Configuration class
  class Configuration
    include ActiveSupport::Configurable
    config_accessor :tolerance_time, :empty_inputs, :max_reply_depth, :default_state, :default_owner_state, :default_title
  end

  configure do |config|
    config.max_reply_depth     = 3
    config.tolerance_time      = 5
    config.default_state       = :draft
    config.default_owner_state = :published
    config.empty_inputs        = [:message]
    config.default_title       = 'Undefined title'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
the_comments-1.1.0 lib/the_comments/config.rb
the_comments-1.0.0 lib/the_comments/config.rb
the_comments-0.9.9 lib/the_comments/config.rb