Sha256: e3b8ab3b4deb37babd6a4f3bcbca133c5ce00f17f6113c190a6594f2f65475ce

Contents?: true

Size: 926 Bytes

Versions: 7

Compression:

Stored size: 926 Bytes

Contents

## www.pubnub.com - PubNub realtime push service in the cloud.
## http://www.pubnub.com/blog/ruby-push-api - Ruby Push API Blog

## PubNub Real Time Push APIs and Notifications Framework
## Copyright (c) 2014 PubNub
## http://www.pubnub.com/

## -----------------------------------
## PubNub Real-time Push Cloud API
## -----------------------------------

require 'json'
require 'base64'
require 'open-uri'
require 'openssl'
require 'eventmachine'
require 'net/http/persistent'
require 'logger'

require 'pubnub/version'
require 'pubnub/client'


class Object
  def blank?
    respond_to?(:empty?) ? empty? : !self
  end

  def present?
    !blank?
  end
end

class Proc
  def try(*a, &b)
    if a.empty? && block_given?
      yield self
    else
      __send__(*a, &b)
    end
  end
end

module Pubnub
  class << self
    attr_accessor :logger

    def new(options = {})
      Pubnub::Client.new(options)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pubnub-3.7.12 lib/pubnub.rb
pubnub-3.7.11 lib/pubnub.rb
pubnub-3.7.10 lib/pubnub.rb
pubnub-3.7.9 lib/pubnub.rb
pubnub-3.7.7 lib/pubnub.rb
pubnub-3.7.5 lib/pubnub.rb
pubnub-3.7.1 lib/pubnub.rb