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