Class: Hash

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

Instance Method Summary collapse

Instance Method Details

#stringifyObject



82
83
84
85
86
87
# File 'lib/models/abstract_user.rb', line 82

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

#stringify!Object



89
90
91
92
93
94
# File 'lib/models/abstract_user.rb', line 89

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