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:) ⇒ Implements

Returns a new instance of Implements.



76
77
78
79
# File 'lib/steep/ast/annotation.rb', line 76

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

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



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

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



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

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