class RBS::Test::ArgumentsReturn

属性

arguments[R]
exit_type[R]
exit_value[R]

公共类方法

break(arguments:) 点击切换源代码
# File rbs-3.8.0/lib/rbs/test.rb, line 47
def self.break(arguments:)
  new(arguments: arguments, exit_value: nil, exit_type: :break)
end
exception(arguments:, exception:) 点击切换源代码
# File rbs-3.8.0/lib/rbs/test.rb, line 43
def self.exception(arguments:, exception:)
  new(arguments: arguments, exit_value: exception, exit_type: :exception)
end
new(arguments:, exit_value:, exit_type:) 点击切换源代码
# File rbs-3.8.0/lib/rbs/test.rb, line 33
def initialize(arguments:, exit_value:, exit_type:)
  @arguments = arguments
  @exit_value = exit_value
  @exit_type = exit_type
end
return(arguments:, value:) 点击切换源代码
# File rbs-3.8.0/lib/rbs/test.rb, line 39
def self.return(arguments:, value:)
  new(arguments: arguments, exit_value: value, exit_type: :return)
end

公共实例方法

break?() 点击切换源代码
# File rbs-3.8.0/lib/rbs/test.rb, line 69
def break?
  exit_type == :break
end
exception() 点击切换源代码
# File rbs-3.8.0/lib/rbs/test.rb, line 56
def exception
  raise unless exit_type == :exception
  exit_value
end
exception?() 点击切换源代码
# File rbs-3.8.0/lib/rbs/test.rb, line 65
def exception?
  exit_type == :exception
end
return?() 点击切换源代码
# File rbs-3.8.0/lib/rbs/test.rb, line 61
def return?
  exit_type == :return
end
return_value() 点击切换源代码
# File rbs-3.8.0/lib/rbs/test.rb, line 51
def return_value
  raise unless exit_type == :return
  exit_value
end