Sha256: 9c7c60cacdace91117d47d5d15e081c73de8c49590a0eff95169ecce222f557f

Contents?: true

Size: 838 Bytes

Versions: 8

Compression:

Stored size: 838 Bytes

Contents

class AdminController; end

module Titler
  class Configuration
    attr_accessor :admin_name,
                  :admin_controller,
                  :app_name_position,
                  :use_env_prefix,
                  :use_app_tagline,
                  :delimiter

    def initialize
      @admin_name = 'Admin'
      @admin_controller = AdminController
      @app_name_position = 'append' # append, prepend, none
      @use_env_prefix = true
      @use_app_tagline = true
      @delimiter = ' - ' #Note: (Eventually) a 'titler.delimiter' i18n value will override this
    end
  end

  class << self
    attr_accessor :configuration
  end

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

  def self.reset
    @configuration = Configuration.new
  end

  def self.configure
    yield(configuration)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
titler-1.2.0 lib/titler/configuration.rb
titler-1.0.2 lib/titler/configuration.rb
titler-1.0.1 lib/titler/configuration.rb
titler-1.0.0 lib/titler/configuration.rb
titler-0.4.4 lib/titler/configuration.rb
titler-0.4.3 lib/titler/configuration.rb
titler-0.4.2 lib/titler/configuration.rb
titler-0.4.1 lib/titler/configuration.rb