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

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

Defined Under Namespace

Classes: Module

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Implements.



74
75
76
77
# File 'lib/steep/ast/annotation.rb', line 74

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

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



71
72
73
# File 'lib/steep/ast/annotation.rb', line 71

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



72
73
74
# File 'lib/steep/ast/annotation.rb', line 72

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



79
80
81
# File 'lib/steep/ast/annotation.rb', line 79

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