Module: Olib::Errors

Defined in:
lib/Olib/core/errors.rb

Defined Under Namespace

Classes: ContainerFull, DoesntExist, Fatal, HandsFull, InsufficientFunds, Mundane, Prempt, TimedOut, TooHeavy

Constant Summary collapse

@@padding =
20

Class Method Summary collapse

Class Method Details

.indent(str) ⇒ Object


9
10
11
# File 'lib/Olib/core/errors.rb', line 9

def Errors.indent(str)
  str.split("\n").map { |line| [''] * @@padding * " " + line }.join("\n")
end

.padding(n) ⇒ Object


5
6
7
# File 'lib/Olib/core/errors.rb', line 5

def Errors.padding(n)
  @@padding = n
end