Class: AdvancedSearch::AST::Id

Inherits:
Base
  • Object
show all
Defined in:
lib/advanced_search/ast/id.rb

Overview

Trusted. Do not construct an ‘Id` directly from user input.

Instance Attribute Summary collapse

Attributes inherited from Base

#edges

Instance Method Summary collapse

Methods inherited from Base

#add_edge

Constructor Details

#initialize(id) ⇒ Id

Returns a new instance of Id.



7
8
9
# File 'lib/advanced_search/ast/id.rb', line 7

def initialize(id)
  @id = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



11
12
13
# File 'lib/advanced_search/ast/id.rb', line 11

def id
  @id
end

Instance Method Details

#accept(visitor) ⇒ Object



13
14
15
# File 'lib/advanced_search/ast/id.rb', line 13

def accept(visitor)
  visitor.visit_id(self)
end