Exception: Subaltern::Return

Inherits:
StandardError
  • Object
show all
Defined in:
lib/subaltern/evaluator.rb

Overview

I wish I could use throw/catch, but only Ruby 1.9.x allows for throwing something else than a Symbol. Going with a standard error for now.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Return

Returns a new instance of Return.



142
143
144
145
146
# File 'lib/subaltern/evaluator.rb', line 142

def initialize(value)

  @value = value
  super('')
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



140
141
142
# File 'lib/subaltern/evaluator.rb', line 140

def value
  @value
end