Module: StringShuffle
- Defined in:
- lib/string_shuffle.rb,
lib/string_shuffle/version.rb
Constant Summary collapse
- VERSION =
"0.1.3"
Class Method Summary collapse
Class Method Details
.shuffle(string) ⇒ Object
5 6 7 |
# File 'lib/string_shuffle.rb', line 5 def self.shuffle(string) string.chars.shuffle.join end |
.shuffle_remove_spaces(string) ⇒ Object
9 10 11 |
# File 'lib/string_shuffle.rb', line 9 def self.shuffle_remove_spaces(string) shuffle(string).gsub(/\s+/, '') end |