Sha256: 750784f43ebc4edfa293cf338357b123ad0f08de8edc779d089ab1780c1eb805

Contents?: true

Size: 1.2 KB

Versions: 9

Compression:

Stored size: 1.2 KB

Contents

require 'ostruct'

module MuckServices
  
  def self.configuration
    # In case the user doesn't setup a configure block we can always return default settings:
    @configuration ||= Configuration.new
  end
  
  def self.configure
    self.configuration ||= Configuration.new
    yield(configuration)
  end

  class Configuration
    
    attr_accessor :enable_services_shares
    attr_accessor :inform_admin_of_global_feed
    attr_accessor :enable_services_comments
    attr_accessor :render_feeds_client_side
    attr_accessor :show_google_search           # Determines whether or not a google search is displayed on the topic page
    attr_accessor :combine_feeds_on_server      # Combines feeds loaded on the server
    attr_accessor :load_feeds_on_server         # Determines whether feeds on a topic page are loaded on the server or the client.  Loading on the server can take a while
    
    def initialize
      self.enable_services_shares = true
      self.inform_admin_of_global_feed = true
      self.enable_services_comments = true
      self.render_feeds_client_side = true
      self.show_google_search = true
      self.combine_feeds_on_server = false
      self.load_feeds_on_server = false
    end
    
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
muck-services-3.3.2 lib/muck-services/config.rb
muck-services-3.3.1 lib/muck-services/config.rb
muck-services-3.3.0 lib/muck-services/config.rb
muck-services-3.2.2 lib/muck-services/config.rb
muck-services-3.2.1 lib/muck-services/config.rb
muck-services-3.2.0 lib/muck-services/config.rb
muck-services-3.1.1 lib/muck-services/config.rb
muck-services-3.1.0 lib/muck-services/config.rb
muck-services-3.0.0 lib/muck-services/config.rb