Class: Slash::TyphoeusQueue

Inherits:
Queue
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/slash/typhoeus.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hydra_or_options = nil) ⇒ TyphoeusQueue

Returns a new instance of TyphoeusQueue.



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/slash/typhoeus.rb', line 11

def initialize(hydra_or_options = nil)
  case hydra_or_options
  when nil
    @hydra = Typhoeus::Hydra.new
    @hydra.disable_memoization
  when Hash
    @hydra = Typhoeus::Hydra.new(hydra_or_options)
    @hydra.disable_memoization
  else
    @hydra = hydra_or_options
  end
end

Instance Attribute Details

#hydraObject

Returns the value of attribute hydra.



24
25
26
# File 'lib/slash/typhoeus.rb', line 24

def hydra
  @hydra
end