Exception: Peruby::LoopControl

Inherits:
StandardError
  • Object
show all
Defined in:
lib/peruby/errors.rb

Overview

Internal non-local control transfer for loop operators.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind, label = nil) ⇒ LoopControl

Returns a new instance of LoopControl.



11
12
13
14
15
# File 'lib/peruby/errors.rb', line 11

def initialize(kind, label = nil)
  @kind = kind
  @label = label
  super([kind, label].compact.join(' '))
end

Instance Attribute Details

#kindObject (readonly)

Returns the value of attribute kind.



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

def kind
  @kind
end

#labelObject (readonly)

Returns the value of attribute label.



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

def label
  @label
end