Sha256: 595c9df32021af545d704cd78b15032581d49e3aedcf4e4745448690e5a4b7d0

Contents?: true

Size: 644 Bytes

Versions: 2

Compression:

Stored size: 644 Bytes

Contents

require 'desk/error'
require 'desk/configuration'
require 'desk/api'
require 'desk/client'
require 'pony'

module Desk
  extend Configuration
  @counter = 0
  @minute = Time.now.min

  class << self
    attr_accessor :counter, :minute
    
    # Alias for Desk::Client.new
    #
    # @return [Desk::Client]
    def client(options={})
      Desk::Client.new(options)
    end

    # Delegate to Desk::Client
    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

2 entries across 2 versions & 1 rubygems

Version Path
desk-0.3.3 lib/desk.rb
desk-0.3.2 lib/desk.rb