Class: Hecks::Adapters::SQLDatabase::Commands::Read::FetchReferences

Inherits:
Object
  • Object
show all
Defined in:
lib/commands/read/fetch_references.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(read_command) ⇒ FetchReferences

Returns a new instance of FetchReferences.



8
9
10
11
12
13
14
# File 'lib/commands/read/fetch_references.rb', line 8

def initialize(read_command)
  @head = read_command.head
  @reference_map = {}
  @entity = read_command.entity
  @table = read_command.table
  @id = read_command.id
end

Instance Attribute Details

#reference_mapObject (readonly)

Returns the value of attribute reference_map.



7
8
9
# File 'lib/commands/read/fetch_references.rb', line 7

def reference_map
  @reference_map
end

Instance Method Details

#callObject



16
17
18
19
20
21
22
# File 'lib/commands/read/fetch_references.rb', line 16

def call
  @head.references.each do |reference|
    fetch_reference(reference)
    fetch_references(reference)
  end
  self
end