Class: Ghundle::Source::Common

Inherits:
Object
  • Object
show all
Defined in:
lib/ghundle/source/common.rb

Overview

A descendant of Source::Common is a source that can be used to fetch a hook from a remote location into a local path. Look at the various children of this class to understand its usage better.

Direct Known Subclasses

Directory, Github, Local

Instance Method Summary collapse

Instance Method Details

#fetch(destination_path) ⇒ Object

Fetches the source into the local path, making it ready for execution. Returns a Source::Local that can be used to access its data.

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/ghundle/source/common.rb', line 20

def fetch(destination_path)
  raise NotImplementedError
end

#fetched?(destination_path) ⇒ Boolean

Checks if the source was already extracted to the given path.

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


25
26
27
# File 'lib/ghundle/source/common.rb', line 25

def fetched?(destination_path)
  raise NotImplementedError
end

#hook_nameObject

Gets the name of the hook based on the url/path it’s given

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/ghundle/source/common.rb', line 9

def hook_name
  raise NotImplementedError
end

#metadataObject

Returns this source’s metadata object.

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/ghundle/source/common.rb', line 14

def 
  raise NotImplementedError
end