Class: Array

Inherits:
Object
  • Object
show all
Includes:
HasharayExt::Interface
Defined in:
lib/hasharay_ext.rb

Instance Method Summary collapse

Methods included from HasharayExt::Interface

#fpath!

Instance Method Details

#fpath(key, strict: false, separator: ".", default: nil) ⇒ Object Also known as: fetch_path



82
83
84
85
86
# File 'lib/hasharay_ext.rb', line 82

def fpath(key, strict: false, separator: ".", default: nil)
  map do |e|
    e.present? ? e.fpath(key, strict: strict, separator: separator, default: default) : default
  end
end