lib/sham.rb in lawrencepit-machinist-1.0.2 vs lib/sham.rb in lawrencepit-machinist-1.0.3
- old
+ new
@@ -22,11 +22,11 @@
def self.clear
@@shams = {}
end
- def self.reset(scope = :all)
+ def self.reset(scope = :before_all)
@@shams.values.each { |sham| sham.reset(scope) }
end
def self.define(&block)
Sham.instance_eval(&block)
@@ -39,10 +39,10 @@
@unique = options.has_key?(:unique) ? options[:unique] : true
generate_values(12)
end
def reset(scope)
- if scope == :all
+ if scope == :before_all
@offset, @before_offset = 0, nil
elsif @before_offset
@offset = @before_offset
else
@before_offset = @offset