Class: Get::Db

Inherits:
Object
  • Object
show all
Defined in:
lib/get/db.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(actions) ⇒ Db

Returns a new instance of Db.



7
8
9
10
# File 'lib/get/db.rb', line 7

def initialize(actions)
  @actions = actions
  @adapter = Get.adapter.new(self.class.store)
end

Class Attribute Details

.collectionObject

Returns the value of attribute collection.



4
5
6
# File 'lib/get/db.rb', line 4

def collection
  @collection
end

.entityObject

Returns the value of attribute entity.



4
5
6
# File 'lib/get/db.rb', line 4

def entity
  @entity
end

.query_keyObject

Returns the value of attribute query_key.



4
5
6
# File 'lib/get/db.rb', line 4

def query_key
  @query_key
end

.storeObject

Returns the value of attribute store.



4
5
6
# File 'lib/get/db.rb', line 4

def store
  @store
end

Instance Method Details

#callObject



12
13
14
15
16
# File 'lib/get/db.rb', line 12

def call
  execute_queries
rescue Horza::Errors::InvalidAncestry
  raise Get::Errors::InvalidAncestry
end