class Hashie::Hash

def flexibly_convert_to_hash(object, options = {})

def flexibly_convert_to_hash(object, options = {})
  if object.method(:to_hash).arity.zero?
    object.to_hash
  else
    object.to_hash(options)
  end
end