Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/simplexframe/ext/string.rb

Instance Method Summary collapse

Instance Method Details

#simple_to_hashObject



2
3
4
5
6
7
8
9
10
# File 'lib/simplexframe/ext/string.rb', line 2

def simple_to_hash
  hash = { }
  return hash if self.empty?
  arr = self.split(',').map { |i| i.strip }
  arr.each do |key|
    hash[key.to_sym] = true 
  end #each
  hash
end