Exception: Sandbox::ParseError
- Defined in:
- lib/sandbox/errors.rb
Instance Method Summary collapse
-
#initialize(reason = nil, args = []) ⇒ ParseError
constructor
A new instance of ParseError.
Methods inherited from Error
Constructor Details
#initialize(reason = nil, args = []) ⇒ ParseError
Returns a new instance of ParseError.
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/sandbox/errors.rb', line 24 def initialize(reason=nil, args=[]) msg = if args.is_a?(Array) && args.size > 0 "#{reason} => #{args.join(' ')}" elsif args.is_a?(String) && args.length > 0 "#{reason} => #{args}" else reason end super(msg) end |