Sha256: d60521c6fae1e22598563ebf4ddb3ac84db29373e33765e415f4396e815566e5

Contents?: true

Size: 163 Bytes

Versions: 2

Compression:

Stored size: 163 Bytes

Contents

module Juici
  module FindLogic

    def find_or_raise(exc, by)
      self.where(by).first.tap do |rec|
        raise exc if rec.nil?
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
juici-0.0.1.alpha1 lib/juici/find_logic.rb
juici-0.0.0.alpha1 lib/juici/find_logic.rb