Class: Clamd::Configuration
- Inherits:
-
Object
- Object
- Clamd::Configuration
- Defined in:
- lib/clamd/configuration.rb
Constant Summary collapse
- DEFAULTS =
Default configuration for Clamd
{ host: 'localhost', port: 9321, open_timeout: 5, read_timeout: 30, chunk_size: 10240 }
Instance Attribute Summary collapse
-
#chunk_size ⇒ Object
Returns the value of attribute chunk_size.
-
#host ⇒ Object
Returns the value of attribute host.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#port ⇒ Object
Returns the value of attribute port.
-
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
16 17 18 19 20 21 22 |
# File 'lib/clamd/configuration.rb', line 16 def initialize self.host = DEFAULTS[:host] self.port = DEFAULTS[:port] self.open_timeout = DEFAULTS[:open_timeout] self.read_timeout = DEFAULTS[:read_timeout] self.chunk_size = DEFAULTS[:chunk_size] end |
Instance Attribute Details
#chunk_size ⇒ Object
Returns the value of attribute chunk_size.
3 4 5 |
# File 'lib/clamd/configuration.rb', line 3 def chunk_size @chunk_size end |
#host ⇒ Object
Returns the value of attribute host.
3 4 5 |
# File 'lib/clamd/configuration.rb', line 3 def host @host end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
3 4 5 |
# File 'lib/clamd/configuration.rb', line 3 def open_timeout @open_timeout end |
#port ⇒ Object
Returns the value of attribute port.
3 4 5 |
# File 'lib/clamd/configuration.rb', line 3 def port @port end |
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
3 4 5 |
# File 'lib/clamd/configuration.rb', line 3 def read_timeout @read_timeout end |