Sha256: 87ec412e317210f74f2b169063721fd2470715c251bf32462885c8858b0dfca7

Contents?: true

Size: 458 Bytes

Versions: 10

Compression:

Stored size: 458 Bytes

Contents

class Foo
  def initialize
    @array = []
    @hash = {}
  end

  def set
    @array << 1
    @array << "str"
    @array << :sym
    @hash[:a] = 1
    @hash[:b] = "str"
    @hash[:c] = :sym
  end

  attr_reader :array, :hash
end

Foo.new.array
Foo.new.hash
Foo.new.set

__END__
# Classes
class Foo
  attr_reader array : Array[:sym | Integer | String]
  attr_reader hash : {:a=>Integer, :b=>String, :c=>:sym}
  def initialize : -> {}
  def set : -> :sym
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
typeprof-0.4.2 smoke/ivar2.rb
typeprof-0.4.1 smoke/ivar2.rb
typeprof-0.4.0 smoke/ivar2.rb
typeprof-0.3.0 smoke/ivar2.rb
typeprof-0.2.0 smoke/ivar2.rb
typeprof-0.1.4 smoke/ivar2.rb
typeprof-0.1.3 smoke/ivar2.rb
typeprof-0.1.2 smoke/ivar2.rb
typeprof-0.1.1 smoke/ivar2.rb
typeprof-0.1.0 smoke/ivar2.rb