Sha256: 1bf6afbd25e5afe2503d3b90516b22152eac8259dd023a8b4566388df560ccb1

Contents?: true

Size: 529 Bytes

Versions: 2

Compression:

Stored size: 529 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 = Providers::Builder.new(subject)
      yield(builder)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pears-0.0.2 lib/pears.rb
pears-0.0.1 lib/pears.rb