module Dotman::Shell

Public Class Methods

block(*args) click to toggle source
# File lib/dotman/shell.rb, line 23
def self.block(*args)
    Block.new(*args)
end
command(*args) click to toggle source
# File lib/dotman/shell.rb, line 27
def self.command(*args)
    Command.new(*args)
end
comparison(*args) click to toggle source
# File lib/dotman/shell.rb, line 31
def self.comparison(*args)
    Comparison.new(*args)
end
condition(*args) click to toggle source
# File lib/dotman/shell.rb, line 35
def self.condition(*args)
    Condition.new(*args)
end
echo(colour, msg) click to toggle source
# File lib/dotman/shell.rb, line 11
def self.echo(colour, msg)
    command('echo "%s"' % msg.send(colour))
end
exit(code) click to toggle source
# File lib/dotman/shell.rb, line 15
def self.exit(code)
    command('exit ' + code.to_s)
end
indent(level) click to toggle source
# File lib/dotman/shell.rb, line 19
def self.indent(level)
    ' ' * (level * 4)
end
satisfies_args(aliases, only: [], except: []) click to toggle source
# File lib/dotman/shell.rb, line 3
def self.satisfies_args(aliases, only: [], except: [])
    if only.length > 0
        Check::Host.new(aliases, only, include: true).to_comparison
    elsif except.length > 0
        Check::Host.new(aliases, except, include: false).to_comparison
    end
end
statement(*args) click to toggle source
# File lib/dotman/shell.rb, line 39
def self.statement(*args)
    Statement.new(*args)
end