-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
1,458 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
module Pod | ||
class Source | ||
|
||
# Defines the required and the optional methods of a data provider. | ||
# | ||
class AbstractDataProvider | ||
|
||
public | ||
|
||
# @group Required methods | ||
#-----------------------------------------------------------------------# | ||
|
||
# @return [String] The name of the source. | ||
# | ||
def name | ||
raise StandardError, "Abstract method." | ||
end | ||
|
||
# @return [String] The user friendly type of the source. | ||
# | ||
def type | ||
raise StandardError, "Abstract method." | ||
end | ||
|
||
# @return [Array<String>] The list of the name of all the Pods known to | ||
# the Source. | ||
# | ||
def pods | ||
raise StandardError, "Abstract method." | ||
end | ||
|
||
# @return [Array<String>] All the available versions of a given Pod, | ||
# sorted from highest to lowest. | ||
# | ||
# @param [String] name | ||
# The name of the Pod. | ||
# | ||
def versions(name) | ||
raise StandardError, "Abstract method." | ||
end | ||
|
||
# @return [Specification] The specification for a given version of a Pod. | ||
# | ||
# @param [String] name | ||
# The name of the Pod. | ||
# | ||
# @param [String] version | ||
# The version of the Pod. | ||
# | ||
def specification(name, version) | ||
raise StandardError, "Abstract method." | ||
end | ||
|
||
# @return [Specification] The contents of the specification for a given | ||
# version of a Pod. | ||
# | ||
# @param [String] name | ||
# the name of the Pod. | ||
# | ||
# @param [String] version | ||
# the version of the Pod. | ||
# | ||
def specification_contents(name, version) | ||
raise StandardError, "Abstract method." | ||
end | ||
|
||
#-----------------------------------------------------------------------# | ||
|
||
end | ||
end | ||
end |
Oops, something went wrong.