Sha256: 947076556f80671d6d207b53c0a6541728c0dbef186b0432e6bba4f04c9afd9b

Contents?: true

Size: 317 Bytes

Versions: 11

Compression:

Stored size: 317 Bytes

Contents

def foo(n)
  case n
  when Integer
    n + 1
  when String
    n + "STR"
  else
    raise
  end
end

def ret_int
  foo(42)
end

def ret_str
  foo("str")
end

__END__
# Classes
class Object
# def foo: (Integer) -> Integer
#        | (String) -> String

  private
  def ret_int: -> Integer
  def ret_str: -> String
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
typeprof-0.20.0 smoke/manual-rbs.rb
typeprof-0.15.3 smoke/manual-rbs.rb
typeprof-0.15.2 smoke/manual-rbs.rb
typeprof-0.15.1 smoke/manual-rbs.rb
typeprof-0.15.0 smoke/manual-rbs.rb
typeprof-0.14.1 smoke/manual-rbs.rb
typeprof-0.14.0 smoke/manual-rbs.rb
typeprof-0.13.0 smoke/manual-rbs.rb
typeprof-0.12.0 smoke/manual-rbs.rb
typeprof-0.11.0 smoke/manual-rbs.rb
typeprof-0.10.0 smoke/manual-rbs.rb