Class: Rulix::Mutators::SqueezeSpaces
- Inherits:
-
Object
- Object
- Rulix::Mutators::SqueezeSpaces
- Defined in:
- lib/rulix/mutators/squeeze_spaces.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.to_proc ⇒ Object
4 5 6 |
# File 'lib/rulix/mutators/squeeze_spaces.rb', line 4 def self.to_proc new.method(:call) end |
Instance Method Details
#call(string) ⇒ Object
8 9 10 11 12 |
# File 'lib/rulix/mutators/squeeze_spaces.rb', line 8 def call string raise ArgumentError, "argument is not a string" unless string.is_a? String string.squeeze ' ' end |