code
register
log in
programs
messages
download
about
privacy
terms
french
production
home
/
documentation
/
Dictionary
/
fetch
Dictionary
examples
hash fetch method example
input
{ a: 1, b: 2 }.fetch(:a)
result
1
hash fetch with default
input
{ a: 1, b: 2 }.fetch(:c) { 3 }
result
3