Module: RBS::AST::Members::Mixin
- Includes:
- _HashEqual
- Defined in:
- lib/rbs/ast/members.rb,
sig/members.rbs
Instance Attribute Summary collapse
-
#annotations ⇒ Array[Annotation]
readonly
Returns the value of attribute annotations.
-
#args ⇒ Array[Types::t]
readonly
Returns the value of attribute args.
-
#comment ⇒ Comment?
readonly
Returns the value of attribute comment.
-
#location ⇒ loc?
readonly
Returns the value of attribute location.
-
#name ⇒ TypeName
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(name:, args:, annotations:, location:, comment:) ⇒ Mixin
A new instance of Mixin.
Instance Attribute Details
#annotations ⇒ Array[Annotation] (readonly)
Returns the value of attribute annotations.
190 191 192 |
# File 'lib/rbs/ast/members.rb', line 190 def annotations @annotations end |
#args ⇒ Array[Types::t] (readonly)
Returns the value of attribute args.
189 190 191 |
# File 'lib/rbs/ast/members.rb', line 189 def args @args end |
#comment ⇒ Comment? (readonly)
Returns the value of attribute comment.
192 193 194 |
# File 'lib/rbs/ast/members.rb', line 192 def comment @comment end |
#location ⇒ loc? (readonly)
Returns the value of attribute location.
191 192 193 |
# File 'lib/rbs/ast/members.rb', line 191 def location @location end |
#name ⇒ TypeName (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:) ⇒ Mixin
Returns a new instance of Mixin.
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 |