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 123

attr_reader :comment

#location (readonly)

[ GitHub ]

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

attr_reader :location

#name (readonly)

[ GitHub ]

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

attr_reader :name

#type (readonly)

[ GitHub ]

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

attr_reader :type

Instance Method Details

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

[ GitHub ]

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

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 136

alias eql? ==

#hash

[ GitHub ]

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

def hash
  name.hash ^ type.hash
end

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

[ GitHub ]

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

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