Class: Dato::Local::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/dato/local/loader.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Loader

Returns a new instance of Loader.



12
13
14
15
16
# File 'lib/dato/local/loader.rb', line 12

def initialize(client)
  @client = client
  @entities_repo = EntitiesRepo.new
  @items_repo = ItemsRepo.new(@entities_repo)
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



8
9
10
# File 'lib/dato/local/loader.rb', line 8

def client
  @client
end

#entities_repoObject (readonly)

Returns the value of attribute entities_repo.



9
10
11
# File 'lib/dato/local/loader.rb', line 9

def entities_repo
  @entities_repo
end

#items_repoObject (readonly)

Returns the value of attribute items_repo.



10
11
12
# File 'lib/dato/local/loader.rb', line 10

def items_repo
  @items_repo
end

Instance Method Details

#loadObject



18
19
20
21
# File 'lib/dato/local/loader.rb', line 18

def load
  @entities_repo = EntitiesRepo.new(site, all_items)
  @items_repo = ItemsRepo.new(@entities_repo)
end