Module: Wonkavision::Facts

Defined in:
lib/wonkavision/facts.rb

Class Method Summary collapse

Class Method Details

.included(facts) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/wonkavision/facts.rb', line 18

def self.included(facts)
  facts.class_eval do
    extend Plugins
    use Plugins::EventHandling
    use Plugins::Callbacks
    use Plugins::Facts
  end
end

.persistenceObject



4
5
6
# File 'lib/wonkavision/facts.rb', line 4

def self.persistence
  @persistence
end

.persistence=(backend) ⇒ Object

current only supports :mongo



9
10
11
12
13
14
15
16
# File 'lib/wonkavision/facts.rb', line 9

def self.persistence=(backend)
  case backend
  when :mongo then require File.dirname(__FILE__) + "/plugins/analytics/mongo"
  else
    raise "#{backend} is not a supported back end for Wonkavision analytics"
  end
  @persistence = backend
end