class Dotman::Action::Init
Public Instance Methods
to_statement()
click to toggle source
# File lib/dotman/actions/init.rb, line 3 def to_statement Shell.statement(init, die) end
Private Instance Methods
check_base()
click to toggle source
# File lib/dotman/actions/init.rb, line 13 def check_base Shell.comparison('$BASE_DIR', '=', '') end
check_host()
click to toggle source
# File lib/dotman/actions/init.rb, line 9 def check_host Shell.comparison('$HOST', '=', '') end
die()
click to toggle source
# File lib/dotman/actions/init.rb, line 21 def die Shell.block([ Shell.echo(:red, 'One or more core environment variables is missing; cannot continue.'), Shell.exit(1) ]) end
init()
click to toggle source
# File lib/dotman/actions/init.rb, line 17 def init Shell.condition([check_host, check_base], :or) end