Sha256: 510e4519b3e2613e2d48a3f12f93df98a221b5f1a6f5d6f6f5b0630efb1db550
Contents?: true
Size: 740 Bytes
Versions: 5
Compression:
Stored size: 740 Bytes
Contents
# frozen_string_literal: true # StringActions Module module KepplerFrontend module Concerns module StringActions extend ActiveSupport::Concern private def not_special_chars chars = ('a'..'z').to_a << '_' chars << ':' end def without_special_characters self.name.gsub!(' ', '_') special_characters.each { |sc| self.name.gsub!(sc, '') } end def special_characters [ '/', '.', '@', '"', "'", '%', '&', '$', '?', '¿', '/', '=', ')', '(', '#', '{', '}', ',', ';', ':', '[', ']', '^', '`', '¨', '~', '+', '-', '*', '¡', '!', '|', '¬', '°', '<', '>', '·', '½' ] end end end end
Version data entries
5 entries across 5 versions & 1 rubygems