Class: Steep::AST::Annotation::Named
- Inherits:
-
Object
- Object
- Steep::AST::Annotation::Named
- Defined in:
- lib/steep/ast/annotation.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name:, type:, location: nil) ⇒ Named
constructor
A new instance of Named.
Constructor Details
#initialize(name:, type:, location: nil) ⇒ Named
Returns a new instance of Named.
9 10 11 12 13 |
# File 'lib/steep/ast/annotation.rb', line 9 def initialize(name:, type:, location: nil) @name = name @type = type @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
7 8 9 |
# File 'lib/steep/ast/annotation.rb', line 7 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/steep/ast/annotation.rb', line 5 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/steep/ast/annotation.rb', line 6 def type @type end |
Instance Method Details
#==(other) ⇒ Object
15 16 17 18 19 |
# File 'lib/steep/ast/annotation.rb', line 15 def ==(other) other.is_a?(self.class) && other.name == name && other.type == type end |