Class: Steep::AST::Annotation::Typed
- Includes:
- Located
- Defined in:
- lib/steep/ast/annotation.rb
Direct Known Subclasses
BlockType, BreakType, InstanceType, ModuleType, ReturnType, SelfType
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes included from Located
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(type:, location: nil) ⇒ Typed
constructor
A new instance of Typed.
Methods included from Located
Constructor Details
#initialize(type:, location: nil) ⇒ Typed
Returns a new instance of Typed.
36 37 38 39 |
# File 'lib/steep/ast/annotation.rb', line 36 def initialize(type:, location: nil) @type = type @location = location end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
34 35 36 |
# File 'lib/steep/ast/annotation.rb', line 34 def type @type end |
Instance Method Details
#==(other) ⇒ Object
41 42 43 44 |
# File 'lib/steep/ast/annotation.rb', line 41 def ==(other) other.is_a?(self.class) && other.type == type end |