diff --git a/lib/redistat/collection.rb b/lib/redistat/collection.rb index a8feaf7..d54654d 100644 --- a/lib/redistat/collection.rb +++ b/lib/redistat/collection.rb @@ -12,5 +12,9 @@ module Redistat @depth = options[:depth] ||= nil end + def total + @total ||= {} + end + end end \ No newline at end of file diff --git a/spec/collection_spec.rb b/spec/collection_spec.rb index 48938bb..74f040f 100644 --- a/spec/collection_spec.rb +++ b/spec/collection_spec.rb @@ -10,4 +10,11 @@ describe Redistat::Collection do result.depth.should == options[:depth] end + it "should have a total property" do + col = Redistat::Collection.new() + col.total.should == {} + col.total = {:foo => "bar"} + col.total.should == {:foo => "bar"} + end + end \ No newline at end of file