Class: Mockolate::Types::Hash

Inherits:
Mockolate::Types show all
Defined in:
lib/mockolate/types/hash.rb

Instance Method Summary collapse

Methods inherited from Mockolate::Types

inherited

Instance Method Details

#parseObject

Public Methods name: Name of the key specified in params block has_children: Returns children elements of hash

Private Methods _parse_child Returns array with parsed children



11
12
13
14
# File 'lib/mockolate/types/hash.rb', line 11

def parse
  return name => {}.merge(*_parse_child) if name
  {}.merge(*_parse_child)
end