Sha256: d55c73387ae48b4b0501d596644e6438fc792603dbeba647b934435b1b576f29

Contents?: true

Size: 622 Bytes

Versions: 12

Compression:

Stored size: 622 Bytes

Contents

module Ucpengine
  class Configuration
    attr_accessor :content_classes

    def initialize
      @content_classes = [].freeze
      @current_user_lookup = Proc.new { raise "No user lookup provided!" }
      @sign_in_url = Proc.new { raise "No sign in url provided!" }
    end

    def current_user_lookup(&block)
      @current_user_lookup = block if block
      @current_user_lookup
    end

    def sign_in_url(&block)
      @sign_in_url = block if block
      @sign_in_url
    end
  end

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

  def self.configure
    yield configuration
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ucpengine-0.1.2 lib/ucpengine/configuration.rb
ucpengine-0.1.1 lib/ucpengine/configuration.rb
ucpengine-0.1.0 lib/ucpengine/configuration.rb
ucpengine-0.0.9 lib/ucpengine/configuration.rb
ucpengine-0.0.8 lib/ucpengine/configuration.rb
ucpengine-0.0.7 lib/ucpengine/configuration.rb
ucpengine-0.0.6 lib/ucpengine/configuration.rb
ucpengine-0.0.5 lib/ucpengine/configuration.rb
ucpengine-0.0.4 lib/ucpengine/configuration.rb
ucpengine-0.0.3 lib/ucpengine/configuration.rb
ucpengine-0.0.2 lib/ucpengine/configuration.rb
ucpengine-0.0.1 lib/ucpengine/configuration.rb