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

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

Defined Under Namespace

Classes: Name

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Dynamic.



114
115
116
117
# File 'lib/steep/ast/annotation.rb', line 114

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

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



111
112
113
# File 'lib/steep/ast/annotation.rb', line 111

def location
  @location
end

#namesObject (readonly)

Returns the value of attribute names.



112
113
114
# File 'lib/steep/ast/annotation.rb', line 112

def names
  @names
end

Instance Method Details

#==(other) ⇒ Object



119
120
121
122
# File 'lib/steep/ast/annotation.rb', line 119

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