module RBS::AST::Members::Attribute
Attributes
annotations
[R]
Array[Annotation]
comment
[R]
Comment?
ivar_name
[R]
Symbol | false | nil
kind
[R]
kind
location
[R]
loc?
type
[R]
Types::t
visibility
[R]
visibility?
Public Class Methods
(name: Symbol, type: Types::t, ivar_name: Symbol | false | nil, kind: kind, annotations: Array[Annotation], location: loc?, comment: Comment?, ?visibility: visibility?) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/members.rb, line 270 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
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/members.rb, line 281 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?
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/members.rb, line 292 def hash name.hash ^ type.hash ^ ivar_name.hash ^ kind.hash ^ visibility.hash end
(?name: Symbol, ?type: Types::t, ?ivar_name: Symbol | false | nil, ?kind: kind, ?annotations: Array[Annotation], ?location: loc?, ?comment: Comment?, ?visibility: visibility?) → instance
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/ast/members.rb, line 296 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