Module: Pickle

Defined in:
lib/pickle-surprise.rb,
lib/pickle-surprise/pickle.rb,
lib/pickle-surprise/version.rb

Overview

Pickle interface

This module has some class methods to you build an interface.

Defined Under Namespace

Modules: Surprise

Class Method Summary collapse

Class Method Details

.allMongoid::Criteria

Get all your pickles

Returns:

  • (Mongoid::Criteria)


18
19
20
# File 'lib/pickle-surprise.rb', line 18

def self.all
  Surprise::Pickle.all
end

.countInteger

Get how many pickles do you have

Returns:

  • (Integer)


11
12
13
# File 'lib/pickle-surprise.rb', line 11

def self.count
  Surprise::Pickle.count
end

.resetObject

Delete all your pickles



23
24
25
# File 'lib/pickle-surprise.rb', line 23

def self.reset
  Surprise::Pickle.delete_all
end