Class: IseshimaStore::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/iseshima_store/connection.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configObject

Returns the value of attribute config.



6
7
8
# File 'lib/iseshima_store/connection.rb', line 6

def config
  @config
end

Class Method Details

.configure {|config| ... } ⇒ Object

Yields:



9
10
11
12
# File 'lib/iseshima_store/connection.rb', line 9

def self.configure(&block)
  self.config ||= OpenStruct.new
  yield(config)
end

.currentObject



14
15
16
# File 'lib/iseshima_store/connection.rb', line 14

def self.current
  @current ||= Gcloud.datastore(config.project_id)
end