Sha256: a3b203fb935082f2125873e9d55ff24ea1b780cceb8130d8ab26710823af32e8

Contents?: true

Size: 616 Bytes

Versions: 10

Compression:

Stored size: 616 Bytes

Contents

module Neutral
  def self.config
    @config ||= Configuration.new
  end

  def self.configure(&block)
    yield config if block_given?
  end

  class Configuration
    include ActiveSupport::Configurable

    config_accessor :can_change
    config_accessor :current_voter_method
    config_accessor :require_login
    config_accessor :vote_owner_class
    config_accessor :default_icon_set
  end

  configure do |config|
    config.can_change = true
    config.current_voter_method = :current_user
    config.require_login = true
    config.vote_owner_class = 'User'
    config.default_icon_set = :thumbs
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
neutral-0.0.10 lib/neutral/configuration.rb
neutral-0.0.9 lib/neutral/configuration.rb
neutral-0.0.8 lib/neutral/configuration.rb
neutral-0.0.7 lib/neutral/configuration.rb
neutral-0.0.6 lib/neutral/configuration.rb
neutral-0.0.5 lib/neutral/configuration.rb
neutral-0.0.4 lib/neutral/configuration.rb
neutral-0.0.3 lib/neutral/configuration.rb
neutral-0.0.2 lib/neutral/configuration.rb
neutral-0.0.1 lib/neutral/configuration.rb