123456789_123456789_123456789_123456789_123456789_

Module: RBS::AST::Members::Var

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/rbs/ast/members.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#comment (readonly)

[ GitHub ]

  
# File 'lib/rbs/ast/members.rb', line 89

attr_reader :comment

#location (readonly)

[ GitHub ]

  
# File 'lib/rbs/ast/members.rb', line 88

attr_reader :location

#name (readonly)

[ GitHub ]

  
# File 'lib/rbs/ast/members.rb', line 86

attr_reader :name

#type (readonly)

[ GitHub ]

  
# File 'lib/rbs/ast/members.rb', line 87

attr_reader :type

Instance Method Details

#==(other) Also known as: #eql?

[ GitHub ]

  
# File 'lib/rbs/ast/members.rb', line 98

def ==(other)
  other.is_a?(self.class) && other.name == name && other.type == type
end

#eql?(other)

Alias for #==.

[ GitHub ]

  
# File 'lib/rbs/ast/members.rb', line 102

alias eql? ==

#hash

[ GitHub ]

  
# File 'lib/rbs/ast/members.rb', line 104

def hash
  name.hash ^ type.hash
end

#initialize(name:, type:, location:, comment:)

[ GitHub ]

  
# File 'lib/rbs/ast/members.rb', line 91

def initialize(name:, type:, location:, comment:)
  @name = name
  @type = type
  @location = location
  @comment = comment
end