Sha256: a8144951a1b2b9e49096d111a1b71157db069126c399f6de43ce8d5e8ea5c3ae

Contents?: true

Size: 527 Bytes

Versions: 2

Compression:

Stored size: 527 Bytes

Contents

# frozen_string_literal: true
require 'dry-configurable'
require_relative "pears/version"
require_relative "pears/errors"
require_relative "pears/provider"
require_relative "pears/subject"

module Pears
  extend Dry::Configurable

  setting :redis_host, default: :localhost

  def self.subjects
    @subjects ||= []
  end

  # This is the main way of locating a subject.
  def self.subject(name)
    Subject.new(name: name).tap do |subject|
      builder = Provider::Builder.new(subject)
      yield(builder)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pears-0.0.5 lib/pears.rb
pears-0.0.4 lib/pears.rb