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.
190 191 192 |
# File 'lib/rbs/ast/members.rb', line 190 def annotations @annotations end |
#args ⇒ Object (readonly)
Returns the value of attribute args.
189 190 191 |
# File 'lib/rbs/ast/members.rb', line 189 def args @args end |
#comment ⇒ Object (readonly)
Returns the value of attribute comment.
192 193 194 |
# File 'lib/rbs/ast/members.rb', line 192 def comment @comment end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
191 192 193 |
# File 'lib/rbs/ast/members.rb', line 191 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
188 189 190 |
# File 'lib/rbs/ast/members.rb', line 188 def name @name end |
Instance Method Details
#==(other) ⇒ Object
202 203 204 |
# File 'lib/rbs/ast/members.rb', line 202 def ==(other) other.is_a?(self.class) && other.name == name && other.args == args end |
#eql?(other) ⇒ Boolean
206 207 208 |
# File 'lib/rbs/ast/members.rb', line 206 def eql?(other) self == other end |
#hash ⇒ Object
210 211 212 |
# File 'lib/rbs/ast/members.rb', line 210 def hash name.hash ^ args.hash end |
#initialize(name:, args:, annotations:, location:, comment:) ⇒ Object
194 195 196 197 198 199 200 |
# File 'lib/rbs/ast/members.rb', line 194 def initialize(name:, args:, annotations:, location:, comment:) @name = name @args = args @annotations = annotations @location = location @comment = comment end |