Class: Rspamd::Configuration
- Inherits:
-
Object
- Object
- Rspamd::Configuration
- Defined in:
- lib/rspamd/configuration.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
- #host ⇒ Object
-
#initialize(**options) ⇒ Configuration
constructor
A new instance of Configuration.
- #open_timeout ⇒ Object
- #password ⇒ Object
- #port ⇒ Object
- #read_timeout ⇒ Object
- #scheme ⇒ Object
- #user_agent ⇒ Object
Constructor Details
#initialize(**options) ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 |
# File 'lib/rspamd/configuration.rb', line 5 def initialize(**) = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'lib/rspamd/configuration.rb', line 3 def end |
Instance Method Details
#host ⇒ Object
13 14 15 |
# File 'lib/rspamd/configuration.rb', line 13 def host [:host] || "localhost" end |
#open_timeout ⇒ Object
22 23 24 |
# File 'lib/rspamd/configuration.rb', line 22 def open_timeout [:open_timeout] || 1 end |
#password ⇒ Object
35 36 37 |
# File 'lib/rspamd/configuration.rb', line 35 def password [:password] end |
#port ⇒ Object
17 18 19 |
# File 'lib/rspamd/configuration.rb', line 17 def port [:port] || 11333 end |
#read_timeout ⇒ Object
26 27 28 |
# File 'lib/rspamd/configuration.rb', line 26 def read_timeout [:read_timeout] || 10 end |
#scheme ⇒ Object
9 10 11 |
# File 'lib/rspamd/configuration.rb', line 9 def scheme [:scheme] || "http" end |
#user_agent ⇒ Object
31 32 33 |
# File 'lib/rspamd/configuration.rb', line 31 def user_agent [:user_agent] || "rspamd-ruby" end |