Sha256: 3f2e473ae0aa6a5647801086ba2269437f07d059e59d24002582b194a77d1cd0

Contents?: true

Size: 635 Bytes

Versions: 1

Compression:

Stored size: 635 Bytes

Contents

require 'rubygems'

module Apphunk
  
  autoload :Logger, 'apphunk/logger'
  autoload :Proxy,  'apphunk/proxy'
  autoload :Remote, 'apphunk/remote'
  
  class << self

    attr_accessor :default_options
    
    def log(message, options = {})
      options = (self.default_options || {}).merge(options)
      Apphunk::Proxy.send_message_to_apphunkd(message, options)
    end
    
    def log_with_options(options = {}, &block)
      preserved_defaults = self.default_options
      self.default_options = (self.default_options || {}).merge(options)
      yield self
      self.default_options = preserved_defaults
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
apphunk-0.1.1 lib/apphunk.rb