Class: MassiveRecord::Wrapper::Base
- Inherits:
-
Object
- Object
- MassiveRecord::Wrapper::Base
- Defined in:
- lib/massive_record/wrapper/base.rb
Class Method Summary collapse
Class Method Details
.config ⇒ Object
15 16 17 18 |
# File 'lib/massive_record/wrapper/base.rb', line 15 def self.config config = YAML.load_file(::Rails.root.join('config', 'hbase.yml'))[::Rails.env] { :host => config['host'], :port => config['port'] } end |
.connection(opts = {}) ⇒ Object
20 21 22 23 24 |
# File 'lib/massive_record/wrapper/base.rb', line 20 def self.connection(opts = {}) conn = Connection.new(opts.empty? ? config : opts) conn.open conn end |