Module: AssociateRB::ObjectExtension

Defined in:
lib/extensions/object_extension.rb,
lib/associate_rb/extensions/object_extension.rb

Instance Method Summary collapse

Instance Method Details

#to(obj) ⇒ Hash

Creates a key-value pair

Parameters:

  • obj (Object)

    the value

Returns:

  • (Hash)

    the key-value pair, with the current object being the key



7
8
9
# File 'lib/extensions/object_extension.rb', line 7

def to(obj)
  { self => obj }
end