Sha256: a4f6fd8d8641af1288565858217b56435fa591a7a93dc711e56406df7baf055e

Contents?: true

Size: 624 Bytes

Versions: 1

Compression:

Stored size: 624 Bytes

Contents

require 'slappy/client'
require 'slappy/configuration'
require 'slappy/version'

module Slappy
  class << self
    @configuration = nil

    def configure
      @configuration = Configuration.new

      yield configuration if block_given?

      configuration
    end

    def configuration
      @configuration || configure
    end

    def client
      @client ||= Client.new
    end

    def method_missing(method, *args, &block)
      return super unless client.respond_to?(method)
      client.send(method, *args, &block)
    end

    def respond_to?(method)
      client.respond_to?(method) || super
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slappy-0.2.0 lib/slappy.rb