Class: Ant::Configuration::Autoconfigs::Sequel

Inherits:
Object
  • Object
show all
Defined in:
lib/ant/configs/autoconfigs/sequel.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Sequel

Returns a new instance of Sequel.



12
13
14
15
# File 'lib/ant/configs/autoconfigs/sequel.rb', line 12

def initialize(config)
  @config = config
  @connection = ::Sequel.connect(config['endpoint'], config)
end

Class Method Details

.from_config(config) ⇒ Object



7
8
9
10
# File 'lib/ant/configs/autoconfigs/sequel.rb', line 7

def self.from_config(config)
  require 'sequel'
  new(config)
end

Instance Method Details

#helpObject



25
26
27
# File 'lib/ant/configs/autoconfigs/sequel.rb', line 25

def help
  CONFIG_KEYS
end

#rawObject



21
22
23
# File 'lib/ant/configs/autoconfigs/sequel.rb', line 21

def raw
  @connection
end

#sanity_checkObject



17
18
19
# File 'lib/ant/configs/autoconfigs/sequel.rb', line 17

def sanity_check
  @connection.fetch('select 1 + 1;')
end