Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/middleman-sculptor/hash_dot_syntax.rb

Overview

Allow keys dot syntax

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args) ⇒ Object



3
4
5
# File 'lib/middleman-sculptor/hash_dot_syntax.rb', line 3

def method_missing(sym, *args)
  fetch(sym) { fetch(sym.to_s) { super } }
end