Module: RoSupport::StringHandler::Common
- Included in:
- RoSupport::StringHandler
- Defined in:
- lib/ro_support/string_handler/common.rb
Instance Method Summary collapse
Instance Method Details
#blank? ⇒ Boolean
4 5 6 7 |
# File 'lib/ro_support/string_handler/common.rb', line 4 def blank? result = self.gsub /\s/, '' result.empty? end |
#collect(str, sign, filter = nil, &blk) ⇒ Object
13 14 15 16 17 |
# File 'lib/ro_support/string_handler/common.rb', line 13 def collect(str, sign, filter = nil, &blk) new_str_arr = collect_sign(str, sign, filter, &blk) new_str = new_str_arr.join end |
#uncamelize ⇒ Object
9 10 11 |
# File 'lib/ro_support/string_handler/common.rb', line 9 def uncamelize self.split(/(?=[A-Z])/).join("_").downcase end |