class Hashie::Hash

def flexibly_convert_to_hash(object, options = {})

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