lib/trocla/util.rb in trocla-0.2.3 vs lib/trocla/util.rb in trocla-0.3.0
- old
+ new
@@ -22,10 +22,11 @@
'shellsafe' => shellsafe,
'windowssafe' => windowssafe,
'numeric' => numeric,
'hexadecimal' => hexadecimal,
'consolesafe' => consolesafe,
+ 'typesafe' => typesafe,
}
h.each { |k, v| h[k] = v.uniq }
end
end
@@ -47,9 +48,12 @@
def alphanumeric
@alphanumeric ||= ('a'..'z').to_a + ('A'..'Z').to_a + numeric
end
def numeric
@numeric ||= ('0'..'9').to_a
+ end
+ def typesafe
+ @typesafe ||= ('a'..'x').to_a - ['i'] - ['l'] + ('A'..'X').to_a - ['I'] - ['L'] + ('1'..'9').to_a
end
def special_chars
@special_chars ||= "*()&![]{}-".split(//)
end
def shellsafe_chars