Class: Object

Inherits:
BasicObject
Defined in:
lib/effigy/core_ext/object.rb

Overview

Internal use only.

Extends Object to easily convert a hash or key, value pair to a hash.

Instance Method Summary collapse

Instance Method Details

#to_effigy_attributes(value) ⇒ Hash

Returns a hash composed of the object as the key and the given value as the value.

Parameters:

  • value (Object)

    the value to use in the generated hash

Returns:

  • (Hash)

    a hash composed of the object as the key and the given value as the value.

See Also:



9
10
11
# File 'lib/effigy/core_ext/object.rb', line 9

def to_effigy_attributes(value)
  { self => value }
end