prepare_trim_mode(mode) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/erb.rb, line 650
    def prepare_trim_mode(mode) # :nodoc:
      case mode
      when 1
        return [false, '>']
      when 2
        return [false, '<>']
      when 0
        return [false, nil]
      when String
        perc = mode.include?('%')
        if mode.include?('-')
          return [perc, '-']
        elsif mode.include?('<>')
          return [perc, '<>']
        elsif mode.include?('>')
          return [perc, '>']
        else
          [perc, nil]
        end
      else
        return [false, nil]
      end
    end
Register or log in to add new notes.