Skip to content
Browse files

fix docstrings for Fancy::Package::Installer

  • Loading branch information...
1 parent 31d72d3 commit 5f8ab9087683d94cf19524951a25e5df14d1f580 @bakkdoor committed
Showing with 25 additions and 3 deletions.
  1. +25 −3 lib/package/installer.fy
View
28 lib/package/installer.fy
@@ -61,13 +61,17 @@ class Fancy Package {
}
def latest_tag {
- "Returns the latest tag (sorted alphabetically)."
+ """
+ Returns the latest tag (sorted alphabetically).
+ """
tags sort last
}
def tags {
- "Returns a list of tags the repository has on Github."
+ """
+ @return @Array@ of git tags in the package's Github repository.
+ """
require("open-uri")
require("rubygems")
@@ -85,7 +89,12 @@ class Fancy Package {
}
def has_version?: version {
- "Indicates, if a given version is available on Github."
+ """
+ @version Version of package to check for.
+ @return @true, if this package has the given version, @false otherwise.
+
+ Indicates, if a given version for this package is available on Github.
+ """
match version {
case "master" -> true
@@ -127,6 +136,12 @@ class Fancy Package {
}
def unpack_file: filename {
+ """
+ @filename File name of package's downloaded .tar.gz file (from Github) to extract
+
+ Unpacks the given @filename and installs it into Fancy's package install dir.
+ """
+
"Unpacking " ++ filename println
System do: $ ["tar xf ", @download_path, "/", filename, " -C ", @install_path, "/"] join
output = System pipe: $ ["tar tf ", @download_path, "/", filename] join
@@ -144,6 +159,13 @@ class Fancy Package {
}
def fulfill_spec: spec {
+ """
+ @spec @Fancy::Package::Specification@ to be fulfilled.
+
+ Installs all dependencies of @spec, sets up symlinks for binary files in @spec,
+ as well as installing the include-file into the Fancy package lib dir.
+ """
+
unless: (spec include_files empty?) do: {
File open: (lib_path + "/" + (spec package_name)) modes: ['write] with: |f| {
spec include_files each: |if| {

0 comments on commit 5f8ab90

Please sign in to comment.
Something went wrong with that request. Please try again.