Class: Metry::Goal

Inherits:
Object
  • Object
show all
Includes:
MongoMapper::Document
Defined in:
lib/metry/goal.rb

Instance Method Summary collapse

Instance Method Details

#path_regexpObject



10
11
12
# File 'lib/metry/goal.rb', line 10

def path_regexp
  Regexp.new("^#{path}$")
end

#visitorsObject



14
15
16
# File 'lib/metry/goal.rb', line 14

def visitors
  Event.find(:all, :conditions => {:path => path_regexp}).inject({}){|a,e| a[e.visitor_id] = e.visitor; a}.values
end