new(to_enc, from_enc=nil) public

No documentation

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

Hide source
# File lib/rss/converter.rb, line 9
    def initialize(to_enc, from_enc=nil)
      normalized_to_enc = to_enc.downcase.gsub(/-/, '_')
      from_enc ||= 'utf-8'
      normalized_from_enc = from_enc.downcase.gsub(/-/, '_')
      if normalized_to_enc == normalized_from_enc
        def_same_enc()
      else
        def_diff_enc = "def_to_#{normalized_to_enc}_from_#{normalized_from_enc}"
        if respond_to?(def_diff_enc)
          __send__(def_diff_enc)
        else
          def_else_enc(to_enc, from_enc)
        end
      end
    end
Register or log in to add new notes.