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 81

attr_reader :comment

#location (readonly)

[ GitHub ]

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

attr_reader :location

#name (readonly)

[ GitHub ]

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

attr_reader :name

#type (readonly)

[ GitHub ]

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

attr_reader :type

Instance Method Details

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

[ GitHub ]

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

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 94

alias eql? ==

#hash

[ GitHub ]

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

def hash
  self.class.hash ^ name.hash ^ type.hash
end

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

[ GitHub ]

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

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