Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/midwire_common/string.rb
Class Method Summary collapse
Instance Method Summary collapse
- #escape_double_quotes ⇒ Object
- #escape_single_quotes ⇒ Object
- #format_phone ⇒ Object
-
#here_with_pipe(linefeeds = false) ⇒ Object
html = <<-stop.here_with_pipe | |
4 5 6 7
# File 'lib/midwire_common/string.rb', line 4 def random(count = 6, ranges = [('a'..'z'),('A'..'Z'),('0'..'9')]) o = ranges.map{|i| i.to_a}.flatten; string = (0..(count-1)).map{ o[rand(o.length)] }.join; end