Module: Khronos::Storage::Adapter::Mongoid

Defined in:
lib/khronos/storage/adapter/mongoid.rb,
lib/khronos/storage/adapter/mongoid/schedule.rb,
lib/khronos/storage/adapter/mongoid/schedule_log.rb

Defined Under Namespace

Classes: Schedule, ScheduleLog

Class Method Summary collapse

Class Method Details

.connect!(uri) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/khronos/storage/adapter/mongoid.rb', line 9

def self.connect!(uri)
  require 'mongo'
  require 'mongoid'

  if File.exists?("config/mongoid.yml")
    ::Mongoid.load!("config/mongoid.yml")
  else
    ::Mongoid.configure do |config|
      config.connect_to uri[:host][1..-1]
    end
  end

  self
end

.extended(base) ⇒ Object



28
29
30
# File 'lib/khronos/storage/adapter/mongoid.rb', line 28

def self.extended(base)
  #puts "extended in #{base.inspect}"
end

.included(base) ⇒ Object



24
25
26
# File 'lib/khronos/storage/adapter/mongoid.rb', line 24

def self.included(base)
  #puts "included in #{base}"
end