Module: Mona::Result::Dict::ReadInterface

Included in:
Err, OK, Sequence
Defined in:
lib/mona/result/dict.rb

Overview

Dict read interface

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object

Since:

  • 0.1.0



18
# File 'lib/mona/result/dict.rb', line 18

def [](key) = to_h[key]

#fetch(key) ⇒ Object

Since:

  • 0.1.0



22
# File 'lib/mona/result/dict.rb', line 22

def fetch(key) = to_h.fetch(key)

#key?(key) ⇒ Boolean

Returns:

  • (Boolean)

Since:

  • 0.1.0



20
# File 'lib/mona/result/dict.rb', line 20

def key?(key) = to_h.key?(key)