Sha256: 5dfa9f1e5345075901350ce8b76e94eab9da38056ba6e7bca7d0d6e7da90b980

Contents?: true

Size: 664 Bytes

Versions: 9

Compression:

Stored size: 664 Bytes

Contents

module Screengem
  class << self
    attr_accessor :configuration
  end

  #
  # Expose the configuration to users of the Screengem gem.
  #
  def self.configure
    self.configuration ||= Screengem::Configuration.new

    yield(configuration) if block_given?
  end

  #
  # Configuration for the Screengem gem.
  #
  class Configuration
    # A string that namespaces questions classes (used by the QuestionFactory).
    attr_accessor :question_scope

    # A string that namespaces task classes (used by the TaskFactory).
    attr_accessor :task_scope

    def initialize
      self.question_scope = "Questions"
      self.task_scope = "Tasks"
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
screengem-0.21.2 lib/screengem/configuration.rb
screengem-0.21.1 lib/screengem/configuration.rb
screengem-0.21.0 lib/screengem/configuration.rb
screengem-0.20.1 lib/screengem/configuration.rb
screengem-0.20.0 lib/screengem/configuration.rb
screengem-0.19.0 lib/screengem/configuration.rb
screengem-0.18.1 lib/screengem/configuration.rb
screengem-0.18.0 lib/screengem/configuration.rb
screengem-0.17.0 lib/screengem/configuration.rb