Class: Webex::Events::Config
- Inherits:
-
Object
- Object
- Webex::Events::Config
- Defined in:
- lib/webex/events.rb
Class Attribute Summary collapse
-
.access_token ⇒ Object
Returns the value of attribute access_token.
- .logger ⇒ Object
Class Method Summary collapse
- .configure(&bloc) ⇒ Object
- .max_retries ⇒ Object
- .max_retries=(retries) ⇒ Object
- .open_timeout ⇒ Object
- .open_timeout=(timeout) ⇒ Object
- .timeout ⇒ Object
- .timeout=(timeout) ⇒ Object
- .write_timeout ⇒ Object
- .write_timeout=(timeout) ⇒ Object
Class Attribute Details
.access_token ⇒ Object
Returns the value of attribute access_token.
21 22 23 |
# File 'lib/webex/events.rb', line 21 def access_token @access_token end |
.logger ⇒ Object
72 73 74 75 |
# File 'lib/webex/events.rb', line 72 def logger return @logger if @logger @logger = Logger.new('/dev/null') end |
Class Method Details
.configure(&bloc) ⇒ Object
24 25 26 |
# File 'lib/webex/events.rb', line 24 def configure(&bloc) bloc.yield self end |
.max_retries ⇒ Object
61 62 63 |
# File 'lib/webex/events.rb', line 61 def max_retries @max_retries ||= 5 end |
.max_retries=(retries) ⇒ Object
65 66 67 68 69 70 |
# File 'lib/webex/events.rb', line 65 def max_retries=(retries) if Integer(retries) < 0 raise 'max_retries must be greater than or equal to 0, %s is given' % retries end @max_retries = retries end |
.open_timeout ⇒ Object
39 40 41 |
# File 'lib/webex/events.rb', line 39 def open_timeout @open_timeout ||= 10 end |
.open_timeout=(timeout) ⇒ Object
43 44 45 46 47 48 |
# File 'lib/webex/events.rb', line 43 def open_timeout=(timeout) if Integer(timeout) <= 0 raise 'open_timeout must be greater than 0, %s is given' % timeout end @open_timeout = timeout end |
.timeout ⇒ Object
28 29 30 |
# File 'lib/webex/events.rb', line 28 def timeout @timeout ||= 30 end |
.timeout=(timeout) ⇒ Object
32 33 34 35 36 37 |
# File 'lib/webex/events.rb', line 32 def timeout=(timeout) if Integer(timeout) <= 0 raise 'timeout must be greater than 0, %s is given' % timeout end @timeout = timeout end |
.write_timeout ⇒ Object
50 51 52 |
# File 'lib/webex/events.rb', line 50 def write_timeout @write_timeout ||= 60 end |
.write_timeout=(timeout) ⇒ Object
54 55 56 57 58 59 |
# File 'lib/webex/events.rb', line 54 def write_timeout=(timeout) if Integer(timeout) <= 0 raise 'write_timeout must be greater than 0, %s is given' % timeout end @write_timeout = timeout end |