Top Level Namespace

Defined Under Namespace

Modules: Gritano

Instance Method Summary collapse

Instance Method Details

#line(text, cols) ⇒ Object



8
9
10
# File 'bin/gritano', line 8

def line(text, cols)
  "% #{text}#{' ' * (cols - (text.length + 3))}%"
end

#table(lines) ⇒ Object



12
13
14
15
# File 'bin/gritano', line 12

def table(lines)
  cols = HighLine.new.output_cols
  (['%' * cols] + lines.map { |l| line(l, cols) } + ['%' * cols]).join("\n")
end