Skip to content

Commit

Permalink
Rename @method tag as @public.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto Reale committed Mar 13, 2018
1 parent 835473e commit 658d6d2
Show file tree
Hide file tree
Showing 66 changed files with 230 additions and 230 deletions.
2 changes: 1 addition & 1 deletion lib/api/github
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

BASHLETS_API_GITHUB_API="${BASHLETS_API_GITHUB_API:-https://api.github.com}"

#@method
#@public
function bashlets::api::github::list_repos_by_user()
{
local user="${1:-bashlets}"
Expand Down
8 changes: 4 additions & 4 deletions lib/basic/env
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


#@method
#@public
function bashlets::basic::env::list()
{
env \
Expand All @@ -43,15 +43,15 @@ function bashlets::basic::env::list()
}


#@method
#@public
function bashlets::basic::env::list_full()
{
env \
| grep -o '^[_[:alpha:]][_[:alnum:]]*'
}


#@method
#@public
function bashlets::basic::env::list_variables()
{
# by enabling ``posix'' mode we tell ``set'' not to print function names
Expand All @@ -64,7 +64,7 @@ function bashlets::basic::env::list_variables()
}


#@method
#@public
function bashlets::basic::env::list_variables_full()
{
# by enabling ``posix'' mode we tell ``set'' not to print function names
Expand Down
14 changes: 7 additions & 7 deletions lib/basic/myself
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,28 @@
################################################################################


#@method
#@public
function bashlets::basic::myself::get_name()
{
[[ "$0" == "-bash" ]] && return
basename "$0"
}

#@method
#@public
function bashlets::basic::myself::get_name_canonical()
{
[[ "$0" == "-bash" ]] && return
basename "$(readlink -m -- "$0")"
}

#@method
#@public
function bashlets::basic::myself::get_path_canonical()
{
[[ "$0" == "-bash" ]] && return
readlink -m -- "$0"
}

#@method
#@public
function bashlets::basic::myself::get_path_effective()
{
# http://stackoverflow.com/questions/59895
Expand All @@ -81,21 +81,21 @@ function bashlets::basic::myself::get_path_effective()
echo "$dir"
}

#@method
#@public
function bashlets::basic::myself::get_ppid()
{
# echo it just to get rid of leading/trailing spaces
# shellcheck disable=SC2005
echo "$(ps -o ppid= -p $$)"
}

#@method
#@public
function bashlets::basic::myself::get_parent_name()
{
ps -o comm= -p "$(bashlets::basic::myself::get_ppid)"
}

#@method
#@public
function bashlets::basic::myself::require_user()
{
test "$(whoami)" = "$1"
Expand Down
4 changes: 2 additions & 2 deletions lib/basic/shell
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@

source bashlet datatype/version

#@method
#@public
function bashlets::basic::shell::get_full_version()
{
echo "$BASH_VERSION"
}

#@method
#@public
function bashlets::basic::shell::get_short_version()
{
# shellcheck disable=SC2001
Expand Down
20 changes: 10 additions & 10 deletions lib/cache/fs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function __bashlets::cache::fs::get_key_path()
echo "$path/$key"
}

#@method
#@public
function bashlets::cache::fs::count_keys()
{
local cache="$1"
Expand All @@ -69,7 +69,7 @@ function bashlets::cache::fs::count_keys()
echo "$count"
}

#@method
#@public
function bashlets::cache::fs::create()
{
local __path="$($BASHLETS_NAMESPACE tempdir create)" || return 1
Expand All @@ -78,7 +78,7 @@ function bashlets::cache::fs::create()
echo "$path"
}

#@method
#@public
function bashlets::cache::fs::destroy()
{
local cache="$1"
Expand All @@ -89,7 +89,7 @@ function bashlets::cache::fs::destroy()
rm -fr "$path"
}

#@method
#@public
function bashlets::cache::fs::exists()
{
local cache="$1"
Expand All @@ -102,7 +102,7 @@ function bashlets::cache::fs::exists()
[[ -e "$key_path" ]]
}

#@method
#@public
function bashlets::cache::fs::list_keys()
{
local cache="$1"
Expand All @@ -113,7 +113,7 @@ function bashlets::cache::fs::list_keys()
find "$path" -type f -printf "%f\n"
}

#@method
#@public
function bashlets::cache::fs::get()
{
local cache="$1"
Expand All @@ -140,7 +140,7 @@ function bashlets::cache::fs::get()
}
}

#@method
#@public
function bashlets::cache::fs::get_type()
{
local cache="$1"
Expand All @@ -154,7 +154,7 @@ function bashlets::cache::fs::get_type()
[[ -d "$key_path" ]] && echo array || echo scalar
}

#@method
#@public
function bashlets::cache::fs::set()
{
local cache="$1"
Expand All @@ -169,7 +169,7 @@ function bashlets::cache::fs::set()
echo "$value" > "$key_path"
}

#@method
#@public
function bashlets::cache::fs::set_array()
{
# TODO: associative arrays
Expand Down Expand Up @@ -201,7 +201,7 @@ function bashlets::cache::fs::set_array()
eval unset $array_name
}

#@method
#@public
function bashlets::cache::fs::unset()
{
local cache="$1"
Expand Down
4 changes: 2 additions & 2 deletions lib/charstream/append
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
source bashlet charstream/filter
source bashlet os/tempfile

#@method
#@public
function bashlets::charstream::append::generic()
{
local filename="$1"
Expand All @@ -53,7 +53,7 @@ function bashlets::charstream::append::generic()
$BASHLETS_NAMESPACE tempfile destroy "$tempfile"
}

#@method
#@public
function bashlets::charstream::append::after_pattern()
{
local filename="$1" ; shift
Expand Down
12 changes: 6 additions & 6 deletions lib/charstream/convert
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
source bashlet datatype/string


#@method
#@public
function bashlets::charstream::convert::dos2unix()
{
local input="$1"
Expand All @@ -55,7 +55,7 @@ function bashlets::charstream::convert::dos2unix()
unset dos2unix
}

#@method
#@public
function bashlets::charstream::convert::unix2dos()
{
local input="$1"
Expand All @@ -73,7 +73,7 @@ function bashlets::charstream::convert::unix2dos()
unset unix2dos
}

#@method
#@public
function bashlets::charstream::convert::rotate()
{
while read
Expand All @@ -82,7 +82,7 @@ function bashlets::charstream::convert::rotate()
done
}

#@method
#@public
function bashlets::charstream::convert::rot13()
{
while read
Expand All @@ -91,7 +91,7 @@ function bashlets::charstream::convert::rot13()
done
}

#@method
#@public
function bashlets::charstream::convert::punch()
{
while read
Expand All @@ -100,7 +100,7 @@ function bashlets::charstream::convert::punch()
done
}

#@method
#@public
function bashlets::charstream::convert::to_piglatin()
{
while read
Expand Down
4 changes: 2 additions & 2 deletions lib/charstream/filter
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
################################################################################


#@method
#@public
function bashlets::charstream::filter::till_pattern()
{
awk "1;/$1/{exit}"
}

#@method
#@public
function bashlets::charstream::filter::after_pattern()
{
# cf. http://stackoverflow.com/questions/17283567/
Expand Down
2 changes: 1 addition & 1 deletion lib/charstream/infer
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# infer length of the indentation step

#@method
#@public
function bashlets::charstream::infer::indent_step()
{
local step="$(
Expand Down
4 changes: 2 additions & 2 deletions lib/charstream/interpolate
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function __bashlets::charstream::interpolate::callback_uneval()
# safely substitute @var tokens with values from shell variables of the same
# name (or from a marshal context, if assigned)

#@method
#@public
function bashlets::charstream::interpolate::eval()
{
local context="$1"
Expand Down Expand Up @@ -147,7 +147,7 @@ function bashlets::charstream::interpolate::eval()

# evaluates expressions inside a @,@ pair of delimiters

#@method
#@public
function bashlets::charstream::interpolate::eval2()
{
# these hold the constant buffer and the buffer to be eval'ed, respect.
Expand Down
2 changes: 1 addition & 1 deletion lib/charstream/reorder
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


#@method
#@public
function bashlets::charstream::reorder::shuffle()
{
local hint_nr=${1:-1024}
Expand Down
6 changes: 3 additions & 3 deletions lib/charstream/reshape
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
################################################################################


#@method
#@public
function bashlets::charstream::reshape::join_lines()
{
local del="$1" # delimiter
Expand All @@ -43,13 +43,13 @@ function bashlets::charstream::reshape::join_lines()
sed ":a;N;\$!ba;s/[\n\r]\+/$del/g"
}

#@method
#@public
function bashlets::charstream::reshape::transpose()
{
bashlets::charstream::reshape::join_lines
}

#@method
#@public
function bashlets::charstream::reshape::as_string()
{
bashlets::charstream::reshape::join_lines
Expand Down
2 changes: 1 addition & 1 deletion lib/charstream/shrink
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Inspired from (but improves on) code at http://bash.cyberciti.biz/

#@method
#@public
function bashlets::charstream::shrink::remove_c_comments()
{
sed -e '
Expand Down

0 comments on commit 658d6d2

Please sign in to comment.