Sha256: bf2e58b40dc9659a8b9cc4a6d07454e115939c65ed010ece4736acddc90fa04c

Contents?: true

Size: 635 Bytes

Versions: 6

Compression:

Stored size: 635 Bytes

Contents

class Foo
  def initialize
    @foo = 42
  end

  private
  attr_accessor :foo

  public
  def get_foo
    foo
  end
  def set_foo(arg)
    self.foo = arg
  end
  def get_bar
    bar
  end
  def set_bar(arg)
    self.bar = arg
  end
end

Foo.new.set_foo("str")
Foo.new.set_bar("str")

__END__
# Errors
smoke/attr-vis.rb:20: [warning] inconsistent assignment to RBS-declared variable

# Classes
class Foo
  def initialize: -> Integer

  private
  attr_accessor foo: Integer | String

  public
  def get_foo: -> (Integer | String)
  def set_foo: (String arg) -> String
  def get_bar: -> Integer
  def set_bar: (String arg) -> String
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
typeprof-0.14.1 smoke/attr-vis.rb
typeprof-0.14.0 smoke/attr-vis.rb
typeprof-0.13.0 smoke/attr-vis.rb
typeprof-0.12.0 smoke/attr-vis.rb
typeprof-0.11.0 smoke/attr-vis.rb
typeprof-0.10.0 smoke/attr-vis.rb