Class: Findr::Encoder

Inherits:
Object
  • Object
show all
Includes:
StrategyProxy
Defined in:
lib/findr/encoder.rb,
lib/findr/encoder/iconv.rb,
lib/findr/encoder/string.rb

Overview

Wrapper class for String#encode (Ruby >=1.9) and Iconv#iconv (Ruby 1.8).

Defined Under Namespace

Classes: Error, Iconv, String

Constant Summary collapse

@@strategy =
RUBY_VERSION < Findr::FIRST_RUBY_WITHOUT_ICONV ? Encoder::Iconv : Encoder::String

Instance Method Summary collapse

Methods included from StrategyProxy

included

Constructor Details

#initialize(other_codings) ⇒ Encoder

Returns a new instance of Encoder.



15
16
17
# File 'lib/findr/encoder.rb', line 15

def initialize( other_codings )
  @strategy = @@strategy.new(other_codings)
end