Sha256: ada8cd225bb0b3dba9bf8e8a3771b6d87371eeb09741a81f8989c2703b255f1c

Contents?: true

Size: 1.09 KB

Versions: 13

Compression:

Stored size: 1.09 KB

Contents

# Enable setting and getting of configuration options.
#
# Example:
#
#   This can now be used under config/initializers/flakey.rb
#   Flakey.configure do |config|

#   end

module Flakey
  class Configuration
    attr_accessor :twitter_handle, :tweet_hashtags, :tweet_via, :tweet_related,
      :tweet_button_size, :tweet_button_class,
      :follow_button_size, :follow_button_class, :follow_button_show_count,
      :facebook_nickname, :facebook_app_id, :stackoverflow_nickname, 
      :stackoverflow_user_id, :github_name, :plus_one_button_language, 
      :google_plus_user_id, :twitter_user_id, :tweet_button_count_position

    def initialize
      self.twitter_user_id = nil
      self.twitter_handle = ''
      self.tweet_hashtags = ''
      self.tweet_via = ''
      self.tweet_related = ''
      self.tweet_button_count_position = 'horizontal'

      self.follow_button_show_count = 'false'

      self.facebook_nickname = ''

      self.google_plus_user_id = ''
    end
  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configure
    yield configuration
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
flakey-0.8.2 lib/flakey/configuration.rb
flakey-0.8.1 lib/flakey/configuration.rb
flakey-0.8.0 lib/flakey/configuration.rb
flakey-0.7.0 lib/flakey/configuration.rb
flakey-0.6.1 lib/flakey/configuration.rb
flakey-0.6.0 lib/flakey/configuration.rb
flakey-0.5.0 lib/flakey/configuration.rb
flakey-0.4.0 lib/flakey/configuration.rb
flakey-0.3.1 lib/flakey/configuration.rb
flakey-0.3.0 lib/flakey/configuration.rb
flakey-0.2.2 lib/flakey/configuration.rb
flakey-0.2.1 lib/flakey/configuration.rb
flakey-0.2.0 lib/flakey/configuration.rb