module RBS::AST::Members::Attribute
Attributes
annotations[R]
comment[R]
ivar_name[R]
kind[R]
location[R]
name[R]
type[R]
visibility[R]
Public Class Methods
new(name:, type:, ivar_name:, kind:, annotations:, location:, comment:, visibility: nil)
click to toggle source
# File rbs-3.2.2/lib/rbs/ast/members.rb, line 268 def initialize(name:, type:, ivar_name:, kind:, annotations:, location:, comment:, visibility: nil) @name = name @type = type @ivar_name = ivar_name @annotations = annotations @location = location @comment = comment @kind = kind @visibility = visibility end
Public Instance Methods
==(other)
click to toggle source
# File rbs-3.2.2/lib/rbs/ast/members.rb, line 279 def ==(other) other.is_a?(self.class) && other.name == name && other.type == type && other.ivar_name == ivar_name && other.kind == kind && other.visibility == visibility end
Also aliased as: eql?
hash()
click to toggle source
# File rbs-3.2.2/lib/rbs/ast/members.rb, line 290 def hash name.hash ^ type.hash ^ ivar_name.hash ^ kind.hash ^ visibility.hash end
update(name: self.name, type: self.type, ivar_name: self.ivar_name, kind: self.kind, annotations: self.annotations, location: self.location, comment: self.comment, visibility: self.visibility)
click to toggle source
# File rbs-3.2.2/lib/rbs/ast/members.rb, line 294 def update(name: self.name, type: self.type, ivar_name: self.ivar_name, kind: self.kind, annotations: self.annotations, location: self.location, comment: self.comment, visibility: self.visibility) klass = _ = self.class klass.new( name: name, type: type, ivar_name: ivar_name, kind: kind, annotations: annotations, location: location, comment: comment, visibility: visibility ) end