Sha256: 38f2ae5e58ecb7179054c39d8930c392cbdc75c0ffee464c14afc4f457dca6a5

Contents?: true

Size: 310 Bytes

Versions: 18

Compression:

Stored size: 310 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
  def ret_int : -> Integer
  def ret_str : -> String
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
typeprof-0.7.0 smoke/manual-rbs.rb
typeprof-0.6.1 smoke/manual-rbs.rb
typeprof-0.6.0 smoke/manual-rbs.rb
typeprof-0.5.4 smoke/manual-rbs.rb
typeprof-0.5.3 smoke/manual-rbs.rb
typeprof-0.5.2 smoke/manual-rbs.rb
typeprof-0.5.1 smoke/manual-rbs.rb
typeprof-0.5.0 smoke/manual-rbs.rb
typeprof-0.4.2 smoke/manual-rbs.rb
typeprof-0.4.1 smoke/manual-rbs.rb
typeprof-0.4.0 smoke/manual-rbs.rb
typeprof-0.3.0 smoke/manual-rbs.rb
typeprof-0.2.0 smoke/manual-rbs.rb
typeprof-0.1.4 smoke/manual-rbs.rb
typeprof-0.1.3 smoke/manual-rbs.rb
typeprof-0.1.2 smoke/manual-rbs.rb
typeprof-0.1.1 smoke/manual-rbs.rb
typeprof-0.1.0 smoke/manual-rbs.rb