module FormatOutput

The format output facility. Neat columns and bullet points for all!

Print out bullet points.

Print out data in neat columns.

Constants

DESCRIPTION
VERSION

Public Class Methods

body(options = {}) click to toggle source

Get the working page width.

# File lib/format_output.rb, line 33
def body(options = {})
  width(options) - (left(options) + right(options))
end
body=(value) click to toggle source

Set the working page width. Note always set after left and right are set.

# File lib/format_output.rb, line 39
def body=(value)
  @width = value.to_i + @left + @right
end
left(options = {}) click to toggle source

Get the left margin

# File lib/format_output.rb, line 44
def left(options = {})
  (options[:left] || @left).to_i
end
left=(value) click to toggle source

Set the left margin

# File lib/format_output.rb, line 49
def left=(value)
  @left = value.to_i
end
pad(options = {}) click to toggle source

The left margin pad string.

# File lib/format_output.rb, line 64
def pad(options = {})
  " " * left(options)
end
right(options = {}) click to toggle source

Get the left margin

# File lib/format_output.rb, line 54
def right(options = {})
  (options[:right] || @right).to_i
end
right=(value) click to toggle source

Set the right margin

# File lib/format_output.rb, line 59
def right=(value)
  @right = value.to_i
end
width(options = {}) click to toggle source

Get the full page width.

# File lib/format_output.rb, line 23
def width(options = {})
  (options[:width] || @width).to_i
end
width=(value) click to toggle source

Set the full page width.

# File lib/format_output.rb, line 28
def width=(value)
  @width = value.to_i
end