Sha256: 12990e406775b59bb3d9d9c51127fcb4fd7c471223fdd921519e02193528ca09

Contents?: true

Size: 383 Bytes

Versions: 9

Compression:

Stored size: 383 Bytes

Contents

FooBar = Struct.new(:foo, :bar)
class FooBar
  def my_foo
    foo
  end
end
def gen_foobar
  FooBar.new(1)
end
foobar = gen_foobar
foobar.foo = "str"
foobar.bar = :sym

__END__
# Classes
class Object
  private
  def gen_foobar: -> FooBar
end

class FooBar < Struct[untyped]
  attr_accessor foo(): Integer | String
  attr_accessor bar(): :sym?
  def my_foo: -> (Integer | String)
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
typeprof-0.20.0 smoke/struct2.rb
typeprof-0.15.3 smoke/struct2.rb
typeprof-0.15.2 smoke/struct2.rb
typeprof-0.15.1 smoke/struct2.rb
typeprof-0.15.0 smoke/struct2.rb
typeprof-0.14.1 smoke/struct2.rb
typeprof-0.14.0 smoke/struct2.rb
typeprof-0.13.0 smoke/struct2.rb
typeprof-0.12.0 smoke/struct2.rb