Class: Sinew::RuntimeOptions
Instance Attribute Summary collapse
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#httpdisk_options ⇒ Object
Returns the value of attribute httpdisk_options.
-
#insecure ⇒ Object
Returns the value of attribute insecure.
-
#rate_limit ⇒ Object
Returns the value of attribute rate_limit.
-
#retries ⇒ Object
Returns the value of attribute retries.
Instance Method Summary collapse
-
#initialize ⇒ RuntimeOptions
constructor
A new instance of RuntimeOptions.
Constructor Details
#initialize ⇒ RuntimeOptions
Returns a new instance of RuntimeOptions.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/sinew/runtime_options.rb', line 13 def initialize self.retries = 3 self.rate_limit = 1 self.headers = { 'User-Agent' => "sinew/#{VERSION}", } self. = {} self.insecure = false # for testing if ENV['SINEW_TEST'] self.rate_limit = 0 end end |
Instance Attribute Details
#headers ⇒ Object
Returns the value of attribute headers.
9 10 11 |
# File 'lib/sinew/runtime_options.rb', line 9 def headers @headers end |
#httpdisk_options ⇒ Object
Returns the value of attribute httpdisk_options.
10 11 12 |
# File 'lib/sinew/runtime_options.rb', line 10 def end |
#insecure ⇒ Object
Returns the value of attribute insecure.
11 12 13 |
# File 'lib/sinew/runtime_options.rb', line 11 def insecure @insecure end |
#rate_limit ⇒ Object
Returns the value of attribute rate_limit.
8 9 10 |
# File 'lib/sinew/runtime_options.rb', line 8 def rate_limit @rate_limit end |
#retries ⇒ Object
Returns the value of attribute retries.
7 8 9 |
# File 'lib/sinew/runtime_options.rb', line 7 def retries @retries end |