Class: Steep::AST::Annotation::Implements

Inherits:
Object
  • Object
show all
Includes:
Located
Defined in:
lib/steep/ast/annotation.rb

Defined Under Namespace

Classes: Module

Instance Attribute Summary collapse

Attributes included from Located

#location

Instance Method Summary collapse

Methods included from Located

#line

Constructor Details

#initialize(name:, location: nil) ⇒ Implements

Returns a new instance of Implements.



84
85
86
87
# File 'lib/steep/ast/annotation.rb', line 84

def initialize(name:, location: nil)
  @location = location
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



82
83
84
# File 'lib/steep/ast/annotation.rb', line 82

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



89
90
91
# File 'lib/steep/ast/annotation.rb', line 89

def ==(other)
  other.is_a?(Implements) && other.name == name
end