Module: RBS::AST::Members::Mixin
Instance Attribute Summary collapse
-
#annotations ⇒ Object
readonly
Returns the value of attribute annotations.
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#comment ⇒ Object
readonly
Returns the value of attribute comment.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
- #initialize(name:, args:, annotations:, location:, comment:) ⇒ Object
Instance Attribute Details
#annotations ⇒ Object (readonly)
Returns the value of attribute annotations.
150 151 152 |
# File 'lib/rbs/ast/members.rb', line 150 def annotations @annotations end |
#args ⇒ Object (readonly)
Returns the value of attribute args.
149 150 151 |
# File 'lib/rbs/ast/members.rb', line 149 def args @args end |
#comment ⇒ Object (readonly)
Returns the value of attribute comment.
152 153 154 |
# File 'lib/rbs/ast/members.rb', line 152 def comment @comment end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
151 152 153 |
# File 'lib/rbs/ast/members.rb', line 151 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
148 149 150 |
# File 'lib/rbs/ast/members.rb', line 148 def name @name end |
Instance Method Details
#==(other) ⇒ Object
162 163 164 |
# File 'lib/rbs/ast/members.rb', line 162 def ==(other) other.is_a?(self.class) && other.name == name && other.args == args end |
#eql?(other) ⇒ Boolean
166 167 168 |
# File 'lib/rbs/ast/members.rb', line 166 def eql?(other) self == other end |
#hash ⇒ Object
170 171 172 |
# File 'lib/rbs/ast/members.rb', line 170 def hash name.hash ^ args.hash end |
#initialize(name:, args:, annotations:, location:, comment:) ⇒ Object
154 155 156 157 158 159 160 |
# File 'lib/rbs/ast/members.rb', line 154 def initialize(name:, args:, annotations:, location:, comment:) @name = name @args = args @annotations = annotations @location = location @comment = comment end |