Sha256: 66616b73da20e9ce8494a531637b2c45e1e5f8d394a887796ada1cc6cbf9d170

Contents?: true

Size: 740 Bytes

Versions: 3

Compression:

Stored size: 740 Bytes

Contents

require 'hull/core_ext/hash'
require 'hull/client'
require 'hull/config'

module Hull
  extend Config
  class << self
    # Alias for Hull::Client.new
    #
    # @return [Hull::Client]
    def new(options={})
      Hull::Client.new(options)
    end

    # Delegate to hull::Client
    def method_missing(method, *args, &block)
      return super unless new.respond_to?(method)
      new.send(method, *args, &block)
    end

    def respond_to?(method, include_private=false)
      new.respond_to?(method, include_private) || super(method, include_private)
    end

    def log msg, level=:debug
      Hull.logger.send(level.to_sym, "[hull:#{Hull.domain}] #{msg}") if Hull.logger && Hull.logger.respond_to?(level.to_sym)
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hullio-0.2.1 lib/hull.rb
hullio-0.2.0 lib/hull.rb
hullio-0.1.0 lib/hull.rb