Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/autowow/decorators/string_decorator.rb

Instance Method Summary collapse

Instance Method Details

#clean_linesObject



7
8
9
# File 'lib/autowow/decorators/string_decorator.rb', line 7

def clean_lines
  each_line.map(&:strip).reject(&:empty?)
end

#reverse_chomp(str) ⇒ Object



3
4
5
# File 'lib/autowow/decorators/string_decorator.rb', line 3

def reverse_chomp(str)
  reverse.chomp(str.reverse).reverse
end