Top Level Namespace

Defined Under Namespace

Modules: Dish Classes: Array, Hash

Instance Method Summary collapse

Instance Method Details

#Dish(hash_or_array) ⇒ Object



1
2
3
4
5
6
7
# File 'lib/dish/helper.rb', line 1

def Dish(hash_or_array)
  case hash_or_array
  when Hash then Dish::Plate.new(hash_or_array)
  when Array then hash_or_array.map { |v| Dish(v) }
  else hash_or_array
  end
end