Class: Steep::AST::Annotation::Named
- Includes:
- Located
- Defined in:
- lib/steep/ast/annotation.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes included from Located
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name:, type:, location: nil) ⇒ Named
constructor
A new instance of Named.
Methods included from Located
Constructor Details
#initialize(name:, type:, location: nil) ⇒ Named
Returns a new instance of Named.
18 19 20 21 22 |
# File 'lib/steep/ast/annotation.rb', line 18 def initialize(name:, type:, location: nil) @name = name @type = type @location = location end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
15 16 17 |
# File 'lib/steep/ast/annotation.rb', line 15 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
16 17 18 |
# File 'lib/steep/ast/annotation.rb', line 16 def type @type end |
Instance Method Details
#==(other) ⇒ Object
24 25 26 27 28 |
# File 'lib/steep/ast/annotation.rb', line 24 def ==(other) other.is_a?(self.class) && other.name == name && other.type == type end |