Class: Steep::AST::Annotation::Dynamic
- Inherits:
-
Object
- Object
- Steep::AST::Annotation::Dynamic
- Defined in:
- lib/steep/ast/annotation.rb
Defined Under Namespace
Classes: Name
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#names ⇒ Object
readonly
Returns the value of attribute names.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(names:, location: nil) ⇒ Dynamic
constructor
A new instance of Dynamic.
Constructor Details
#initialize(names:, location: nil) ⇒ Dynamic
Returns a new instance of Dynamic.
118 119 120 121 |
# File 'lib/steep/ast/annotation.rb', line 118 def initialize(names:, location: nil) @location = location @names = names end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
115 116 117 |
# File 'lib/steep/ast/annotation.rb', line 115 def location @location end |
#names ⇒ Object (readonly)
Returns the value of attribute names.
116 117 118 |
# File 'lib/steep/ast/annotation.rb', line 116 def names @names end |
Instance Method Details
#==(other) ⇒ Object
123 124 125 126 127 |
# File 'lib/steep/ast/annotation.rb', line 123 def ==(other) other.is_a?(Dynamic) && other.names == names && (!other.location || location || other.location == location) end |