Module: Primer

Defined in:
lib/primer.rb,
lib/primer/bus.rb,
lib/primer/cache.rb,
lib/primer/worker.rb,
lib/primer/enabler.rb,
lib/primer/helpers.rb,
lib/primer/watcher.rb,
lib/primer/bus/amqp.rb,
lib/primer/lazyness.rb,
lib/primer/real_time.rb,
lib/primer/route_set.rb,
lib/primer/bus/memory.rb,
lib/primer/cache/redis.rb,
lib/primer/cache/memory.rb,
lib/primer/watcher/macros.rb,
lib/primer/worker/changes_agent.rb,
lib/primer/worker/active_record_agent.rb,
lib/primer/watcher/active_record_macros.rb

Defined Under Namespace

Modules: Enabler, Helpers, Lazyness, Watcher Classes: Bus, Cache, InvalidKey, RealTime, RouteNotFound, RouteSet, Router, Worker

Constant Summary collapse

ROOT =
File.expand_path(File.dirname(__FILE__))

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.busObject

Returns the value of attribute bus.



22
23
24
# File 'lib/primer.rb', line 22

def bus
  @bus
end

.cacheObject

Returns the value of attribute cache.



22
23
24
# File 'lib/primer.rb', line 22

def cache
  @cache
end

.real_timeObject

Returns the value of attribute real_time.



22
23
24
# File 'lib/primer.rb', line 22

def real_time
  @real_time
end

Class Method Details

.deserialize(string) ⇒ Object



35
36
37
# File 'lib/primer.rb', line 35

def self.deserialize(string)
  YAML.load(string).first
end

.serialize(object) ⇒ Object



31
32
33
# File 'lib/primer.rb', line 31

def self.serialize(object)
  YAML.dump([object])
end

.worker!Object



27
28
29
# File 'lib/primer.rb', line 27

def self.worker!
  Worker.new.run!
end