Class: Steep::AST::Annotation::Typed
- Inherits:
-
Object
- Object
- Steep::AST::Annotation::Typed
- Defined in:
- lib/steep/ast/annotation.rb
Direct Known Subclasses
BlockType, BreakType, InstanceType, ModuleType, ReturnType, SelfType
Instance Attribute Summary collapse
-
#annotation ⇒ Object
readonly
Returns the value of attribute annotation.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(type:, location: nil) ⇒ Typed
constructor
A new instance of Typed.
Constructor Details
#initialize(type:, location: nil) ⇒ Typed
Returns a new instance of Typed.
27 28 29 30 |
# File 'lib/steep/ast/annotation.rb', line 27 def initialize(type:, location: nil) @type = type @location = location end |
Instance Attribute Details
#annotation ⇒ Object (readonly)
Returns the value of attribute annotation.
24 25 26 |
# File 'lib/steep/ast/annotation.rb', line 24 def annotation @annotation end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
25 26 27 |
# File 'lib/steep/ast/annotation.rb', line 25 def location @location end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
23 24 25 |
# File 'lib/steep/ast/annotation.rb', line 23 def type @type end |
Instance Method Details
#==(other) ⇒ Object
32 33 34 35 |
# File 'lib/steep/ast/annotation.rb', line 32 def ==(other) other.is_a?(self.class) && other.type == type end |