Sha256: 3b8fb000cc285d5992e3970cd2ac50f7840048ef7f0c5121197ec8f14875b4e1

Contents?: true

Size: 399 Bytes

Versions: 1

Compression:

Stored size: 399 Bytes

Contents

# frozen_string_literal: true

class Mockolate::Types::Hash < Mockolate::Types
  # 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
  
  def parse
    return name => {}.merge(*_parse_child) if name
    {}.merge(*_parse_child)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mockolate-0.1.0 lib/mockolate/types/hash.rb