Sha256: e6283594c3fb90feb74b30e789303e62dfc64d101ec672bee685ca9b3131956c
Contents?: true
Size: 1.21 KB
Versions: 1
Compression:
Stored size: 1.21 KB
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) 2013 PubNub ## http://www.pubnub.com/ ## ----------------------------------- ## PubNub 3.4 Real-time Push Cloud API ## ----------------------------------- require 'json' require 'base64' require 'open-uri' require 'uri' require 'openssl' require 'eventmachine' require 'em-http-request' require 'pubnub/version.rb' require 'pubnub/client.rb' require 'pubnub/request.rb' require 'pubnub/configuration.rb' require 'pubnub/error.rb' require 'pubnub/crypto.rb' 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 extend Configuration include Error class << self def new(options = {}) #raise(Pubnub::Error::InitError, 'Initialize with either a hash of options, or exactly 5 named parameters.') unless args.size == 5 or (args.size == 1 and args[0].class == Hash) Pubnub::Client.new(options) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pubnub-3.4.1 | lib/pubnub.rb |