class Hypernova::Configuration
Constants
- VALID_SCHEMES
Attributes
host[RW]
http_adapter[RW]
http_client[RW]
open_timeout[RW]
port[RW]
scheme[RW]
timeout[RW]
Public Class Methods
new()
click to toggle source
# File lib/hypernova/configuration.rb, line 14 def initialize @open_timeout = 0.1 @scheme = :http @timeout = 0.6 end
Public Instance Methods
scheme=(value)
click to toggle source
# File lib/hypernova/configuration.rb, line 24 def scheme=(value) validate_scheme!(value) @scheme = value end
Private Instance Methods
validate_scheme!(value)
click to toggle source
# File lib/hypernova/configuration.rb, line 31 def validate_scheme!(value) raise TypeError.new("Unknown scheme #{value}") unless VALID_SCHEMES.include?(value) end