Sha256: e6c9e3eba508c8ce0436e79b5945d21b010de779edf60c12f364af7e4b9968d8
Contents?: true
Size: 583 Bytes
Versions: 3
Compression:
Stored size: 583 Bytes
Contents
module Pwush MissingAuthToken = Class.new(StandardError) MissingAppToken = Class.new(StandardError) class Config URL = 'https://cp.pushwoosh.com/json/1.3'.freeze def initialize(options = {}) @url = options[:url] || URL @auth = options[:auth] || auth_missing @app = options[:app] || app_missing end attr_accessor :auth, :url, :app private def auth_missing raise(MissingAuthToken, 'please provide :auth argument') end def app_missing raise(MissingAppToken, 'please provide :app argument') end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pwush-0.1.2 | lib/pwush/config.rb |
pwush-0.1.0 | lib/pwush/config.rb |
pwush-0.0.0 | lib/pwush/config.rb |