Class: Threatinator::Fetcher

Inherits:
Object
  • Object
show all
Defined in:
lib/threatinator/fetcher.rb

Direct Known Subclasses

Threatinator::Fetchers::Http

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Fetcher

Returns a new instance of Fetcher.

Parameters:

  • opts (Hash) (defaults to: {})

    An options hash. See subclasses for details.



5
6
# File 'lib/threatinator/fetcher.rb', line 5

def initialize(opts = {})
end

Instance Method Details

#==(other) ⇒ Object



13
14
15
# File 'lib/threatinator/fetcher.rb', line 13

def ==(other)
  true
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
20
# File 'lib/threatinator/fetcher.rb', line 17

def eql?(other)
  self.class == other.class &&
    self == other
end

#fetchIO

Returns an IO object.

Returns:

  • (IO)

    an IO object

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/threatinator/fetcher.rb', line 9

def fetch
  raise NotImplementedError.new("#{self.class}#fetch not implemented!")
end