Sha256: 7bc170e7107bc3dff62e4dcbfde7ec5a3b6c4da9c2f7fa19381f739d02882e78

Contents?: true

Size: 256 Bytes

Versions: 12

Compression:

Stored size: 256 Bytes

Contents

module RevealCK
  # Retrieve the value of a symbol from a hash or fail
  module Retrieve
    def retrieve(symbol, hash)
      hash[symbol] || raise("#{symbol} is required")
    end

    def self.included(base)
      base.extend(Retrieve)
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
reveal-ck-4.0.0 lib/reveal-ck/retrieve.rb
reveal-ck-3.9.2 lib/reveal-ck/retrieve.rb
reveal-ck-3.9.1 lib/reveal-ck/retrieve.rb
reveal-ck-3.9.0 lib/reveal-ck/retrieve.rb
reveal-ck-3.8.1 lib/reveal-ck/retrieve.rb
reveal-ck-3.8.0 lib/reveal-ck/retrieve.rb
reveal-ck-3.7.0 lib/reveal-ck/retrieve.rb
reveal-ck-3.6.0 lib/reveal-ck/retrieve.rb
reveal-ck-3.5.1 lib/reveal-ck/retrieve.rb
reveal-ck-3.5.0 lib/reveal-ck/retrieve.rb
reveal-ck-3.4.0 lib/reveal-ck/retrieve.rb
reveal-ck-3.3.1 lib/reveal-ck/retrieve.rb