Sha256: 23c7cbafd36440e10429019635562959b8ab775e1a1f682ff06d6a9ae356a406
Contents?: true
Size: 398 Bytes
Versions: 24
Compression:
Stored size: 398 Bytes
Contents
RSpec.describe "EitilCore Hash#auto_dig" do it "should recursively find the value for the given hash key" do hash = {a: 1, b: {c: 2, d: {e: 3}}} result = hash.auto_dig :e expect(result).to eq 3 end it "should return nil if the given hash key is not present" do hash = {a: 1, b: {c: 2, d: {e: 3}}} result = hash.auto_dig :f expect(result).to be_nil end end
Version data entries
24 entries across 24 versions & 1 rubygems