Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/models/abstract_user.rb

Instance Method Summary collapse

Instance Method Details

#stringifyObject



79
80
81
82
83
84
# File 'lib/models/abstract_user.rb', line 79

def stringify
  inject({}) do |options, (key, value)|
    options[key.to_s] = value.to_s
    options
  end
end

#stringify!Object



86
87
88
89
90
91
# File 'lib/models/abstract_user.rb', line 86

def stringify!
  each do |key, value|
    delete(key)
    store(key.to_s, value.to_s)
  end
end