Class: Pwush::Config
- Inherits:
-
Object
- Object
- Pwush::Config
- Defined in:
- lib/pwush/config.rb
Constant Summary collapse
- URL =
'https://cp.pushwoosh.com/json/1.3'.freeze
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#auth ⇒ Object
Returns the value of attribute auth.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(options = {}) ⇒ Config
Returns a new instance of Config.
10 11 12 13 14 15 16 |
# File 'lib/pwush/config.rb', line 10 def initialize( = {}) @url = [:url] || URL @auth = [:auth] || auth_missing @app = [:app] || app_missing @timeout = [:timeout] || { write: 2, connect: 5, read: 10 } @logger = [:logger] || Logger.new(STDOUT) end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
18 19 20 |
# File 'lib/pwush/config.rb', line 18 def app @app end |
#auth ⇒ Object
Returns the value of attribute auth.
18 19 20 |
# File 'lib/pwush/config.rb', line 18 def auth @auth end |
#logger ⇒ Object
Returns the value of attribute logger.
18 19 20 |
# File 'lib/pwush/config.rb', line 18 def logger @logger end |
#timeout ⇒ Object
Returns the value of attribute timeout.
18 19 20 |
# File 'lib/pwush/config.rb', line 18 def timeout @timeout end |
#url ⇒ Object
Returns the value of attribute url.
18 19 20 |
# File 'lib/pwush/config.rb', line 18 def url @url end |