Class: GemsBond::Fetchers::Fetcher

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

Overview

Fetches data

Direct Known Subclasses

Github, RubyGems

Instance Method Summary collapse

Constructor Details

#initialize(param) ⇒ GemsBond::Fetchers::Fetcher

Initializes an instance

Parameters:

  • param (Object)

    Fetcher dependent



14
# File 'lib/gems_bond/fetchers/fetcher.rb', line 14

def initialize(param); end

Instance Method Details

#startObject

Note:

rescue connection errors with nil

Starts the service and returns self



18
19
20
# File 'lib/gems_bond/fetchers/fetcher.rb', line 18

def start
  @started = true
end

#started?Boolean

Is the service started?

Returns:

  • (Boolean)


29
30
31
# File 'lib/gems_bond/fetchers/fetcher.rb', line 29

def started?
  @started
end

#stopObject

Note:

rescue connection errors with nil

Starts the service and returns self



24
25
26
# File 'lib/gems_bond/fetchers/fetcher.rb', line 24

def stop
  @started = false
end