class Object

Last but not least add catch/throw to Opal as these are currently missing (as of version 8.beta) There is a PR to bring these into Opal properly.

Public Instance Methods

catch(sym) { || ... } click to toggle source
# File lib/opal/aasm.rb, line 137
def catch(sym)
  yield
rescue CatchThrow => e
  return e.arg if e.sym == sym
  raise e
end
throw(*args) click to toggle source
# File lib/opal/aasm.rb, line 144
def throw(*args)
  raise CatchThrow.new(args)
end