Module: Haml::Helpers

Included in:
RailsHelpers
Defined in:
lib/haml/helpers.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.preserve(input)



4
5
6
7
8
9
# File 'lib/haml/helpers.rb', line 4

def self.preserve(input)
  s = input.to_s.chomp("\n")
  s.gsub!(/\n/, '
')
  s.delete!("\r")
  s
end

Instance Method Details

#preserve(input)



11
12
13
# File 'lib/haml/helpers.rb', line 11

def preserve(input)
  Helpers.preserve(input)
end