Class: String
Overview
require ‘activesupport’
Instance Method Summary collapse
- #from_url_params ⇒ Object
- #not_empty? ⇒ Boolean (also: #not_blank?)
Instance Method Details
#from_url_params ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/extensions/string.rb', line 13 def from_url_params puts self result = {}.with_indifferent_access self.split('&').each do |element| element = element.split('=') result[element[0]] = element[1] end result end |
#not_empty? ⇒ Boolean Also known as: not_blank?
5 6 7 |
# File 'lib/extensions/string.rb', line 5 def not_empty? not empty? end |