Sha256: 132c6e02a3837a5c9cb8a0123346f00a2b2f331dc82663a4ce5538abaac33b80

Contents?: true

Size: 255 Bytes

Versions: 14

Compression:

Stored size: 255 Bytes

Contents

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

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
reveal-ck-3.3.0 lib/reveal-ck/retrieve.rb
reveal-ck-3.2.0 lib/reveal-ck/retrieve.rb
reveal-ck-3.1.0 lib/reveal-ck/retrieve.rb
reveal-ck-3.0.1 lib/reveal-ck/retrieve.rb
reveal-ck-3.0.0 lib/reveal-ck/retrieve.rb
reveal-ck-0.6.2 lib/reveal-ck/retrieve.rb
reveal-ck-0.6.1 lib/reveal-ck/retrieve.rb
reveal-ck-0.6.0 lib/reveal-ck/retrieve.rb
reveal-ck-0.5.1 lib/reveal-ck/retrieve.rb
reveal-ck-0.5.0 lib/reveal-ck/retrieve.rb
reveal-ck-0.4.2 lib/reveal-ck/retrieve.rb
reveal-ck-0.4.1 lib/reveal-ck/retrieve.rb
reveal-ck-0.4.0 lib/reveal-ck/retrieve.rb
reveal-ck-0.3.0 lib/reveal-ck/retrieve.rb