Class: Steep::AST::Annotation::Dynamic

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

Defined Under Namespace

Classes: Name

Instance Attribute Summary collapse

Attributes included from Located

#location

Instance Method Summary collapse

Methods included from Located

#line

Constructor Details

#initialize(names:, location: nil) ⇒ Dynamic

Returns a new instance of Dynamic.



125
126
127
128
# File 'lib/steep/ast/annotation.rb', line 125

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

Instance Attribute Details

#namesObject (readonly)

Returns the value of attribute names.



123
124
125
# File 'lib/steep/ast/annotation.rb', line 123

def names
  @names
end

Instance Method Details

#==(other) ⇒ Object



130
131
132
133
# File 'lib/steep/ast/annotation.rb', line 130

def ==(other)
  other.is_a?(Dynamic) &&
    other.names == names
end