Class: HookSniff::Options
- Inherits:
-
Object
- Object
- HookSniff::Options
- Defined in:
- lib/hooksniff/options.rb
Overview
Configuration options for the HookSniff client.
Instance Attribute Summary collapse
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#retry_schedule ⇒ Object
Returns the value of attribute retry_schedule.
-
#server_url ⇒ Object
Returns the value of attribute server_url.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize(server_url: nil, timeout: 30, debug: false, headers: {}, retry_schedule: [1, 2, 4]) ⇒ Options
constructor
A new instance of Options.
Constructor Details
#initialize(server_url: nil, timeout: 30, debug: false, headers: {}, retry_schedule: [1, 2, 4]) ⇒ Options
Returns a new instance of Options.
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/hooksniff/options.rb', line 17 def initialize( server_url: nil, timeout: 30, debug: false, headers: {}, retry_schedule: [1, 2, 4] ) @server_url = server_url @timeout = timeout @debug = debug @headers = headers || {} @retry_schedule = retry_schedule end |
Instance Attribute Details
#debug ⇒ Object
Returns the value of attribute debug.
15 16 17 |
# File 'lib/hooksniff/options.rb', line 15 def debug @debug end |
#headers ⇒ Object
Returns the value of attribute headers.
15 16 17 |
# File 'lib/hooksniff/options.rb', line 15 def headers @headers end |
#retry_schedule ⇒ Object
Returns the value of attribute retry_schedule.
15 16 17 |
# File 'lib/hooksniff/options.rb', line 15 def retry_schedule @retry_schedule end |
#server_url ⇒ Object
Returns the value of attribute server_url.
15 16 17 |
# File 'lib/hooksniff/options.rb', line 15 def server_url @server_url end |
#timeout ⇒ Object
Returns the value of attribute timeout.
15 16 17 |
# File 'lib/hooksniff/options.rb', line 15 def timeout @timeout end |