Permalink
Browse files

Reference proper variable

  • Loading branch information...
Kristjan Petursson
Kristjan Petursson committed Apr 29, 2010
1 parent c914268 commit 9722decc68675ad699888b81d28ccc5bfd4fd0d8
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/modesty/experiment.rb
@@ -32,7 +32,7 @@ def metrics(*args)
def metric(sym, options={})
@exp.metrics << (Modesty.metrics[sym] || raise(
Modesty::NoMetricError,
- "Undefined metric #{s.inspect} in experiment #{@exp}"
+ "Undefined metric #{sym.inspect} in experiment #{@exp}"
))
if options[:by]
@exp.metric_contexts.merge!({sym => options[:by].to_s.pluralize.to_sym})
@@ -57,7 +57,7 @@ def identity_for(sym)
self.metric_contexts[sym]
end
- attr_reader *ATTRIBUTES
+ attr_reader *ATTRIBUTES
attr_reader :slug
attr_reader :metrics
@@ -110,7 +110,7 @@ def choose_group
end
def generate_alternative(identity)
- alternative = self.alternatives[
+ alternative = self.alternatives[
"#{@slug}#{identity}".hash % self.alternatives.count
]
self.chooses(alternative)

0 comments on commit 9722dec

Please sign in to comment.