class String

Public Instance Methods

lazy_to_hash() click to toggle source
# File lib/magicspec/ext/string.rb, line 2
def lazy_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