Class: Scruber::Core::Configuration
- Inherits:
-
Object
- Object
- Scruber::Core::Configuration
- Defined in:
- lib/scruber/core/configuration.rb
Instance Attribute Summary collapse
-
#fetcher_adapter ⇒ Object
Returns the value of attribute fetcher_adapter.
-
#fetcher_agent_adapter ⇒ Object
Returns the value of attribute fetcher_agent_adapter.
-
#fetcher_agent_options ⇒ Object
Returns the value of attribute fetcher_agent_options.
-
#fetcher_options ⇒ Object
Returns the value of attribute fetcher_options.
-
#queue_adapter ⇒ Object
Returns the value of attribute queue_adapter.
-
#queue_options ⇒ Object
Returns the value of attribute queue_options.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #merge_options(options) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 14 15 16 17 18 |
# File 'lib/scruber/core/configuration.rb', line 11 def initialize @fetcher_adapter = :typhoeus_fetcher @fetcher_options = {} @fetcher_agent_adapter = :memory @fetcher_agent_options = {} @queue_adapter = :memory @queue_options = {} end |
Instance Attribute Details
#fetcher_adapter ⇒ Object
Returns the value of attribute fetcher_adapter.
4 5 6 |
# File 'lib/scruber/core/configuration.rb', line 4 def fetcher_adapter @fetcher_adapter end |
#fetcher_agent_adapter ⇒ Object
Returns the value of attribute fetcher_agent_adapter.
4 5 6 |
# File 'lib/scruber/core/configuration.rb', line 4 def fetcher_agent_adapter @fetcher_agent_adapter end |
#fetcher_agent_options ⇒ Object
Returns the value of attribute fetcher_agent_options.
4 5 6 |
# File 'lib/scruber/core/configuration.rb', line 4 def @fetcher_agent_options end |
#fetcher_options ⇒ Object
Returns the value of attribute fetcher_options.
4 5 6 |
# File 'lib/scruber/core/configuration.rb', line 4 def @fetcher_options end |
#queue_adapter ⇒ Object
Returns the value of attribute queue_adapter.
4 5 6 |
# File 'lib/scruber/core/configuration.rb', line 4 def queue_adapter @queue_adapter end |
#queue_options ⇒ Object
Returns the value of attribute queue_options.
4 5 6 |
# File 'lib/scruber/core/configuration.rb', line 4 def @queue_options end |
Instance Method Details
#merge_options(options) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/scruber/core/configuration.rb', line 20 def () @fetcher_adapter = .fetch(:fetcher_adapter){ @fetcher_adapter } @fetcher_options.merge! .fetch(:fetcher_options){ {} } @fetcher_agent_adapter = .fetch(:fetcher_agent_adapter){ @fetcher_agent_adapter } @fetcher_agent_options.merge! .fetch(:fetcher_agent_options){ {} } @queue_adapter = .fetch(:queue_adapter){ @queue_adapter } @queue_options.merge! .fetch(:queue_options){ {} } end |