Sha256: 2a17e9c26dff7b7a6f8d4bbe98cbc3742fe08e2c2ade67655e2b83dbe0f93b58
Contents?: true
Size: 436 Bytes
Versions: 1
Compression:
Stored size: 436 Bytes
Contents
class AnimalError < StandardError; end class MammalError < StandardError; end class Cat class CatError < StandardError; end include TokenAction::TokenGenerator include Mongoid::Document field :token, type: String def self.redeem_token(action = nil) case action when 'upgrade' raise AnimalError.new when 'metamorphose' raise MammalError.new when 'fly' raise CatError.new end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
token_action-0.0.2 | spec/dummy/app/mongoid/cat.rb |