Class: Ant::Configuration::Autoconfigs::Sequel
- Inherits:
-
Object
- Object
- Ant::Configuration::Autoconfigs::Sequel
- Defined in:
- lib/ant/configs/autoconfigs/sequel.rb
Class Method Summary collapse
Instance Method Summary collapse
- #help ⇒ Object
-
#initialize(config) ⇒ Sequel
constructor
A new instance of Sequel.
- #raw ⇒ Object
- #sanity_check ⇒ Object
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
#help ⇒ Object
25 26 27 |
# File 'lib/ant/configs/autoconfigs/sequel.rb', line 25 def help CONFIG_KEYS end |
#raw ⇒ Object
21 22 23 |
# File 'lib/ant/configs/autoconfigs/sequel.rb', line 21 def raw @connection end |
#sanity_check ⇒ Object
17 18 19 |
# File 'lib/ant/configs/autoconfigs/sequel.rb', line 17 def sanity_check @connection.fetch('select 1 + 1;') end |