Class: Findr::Encoder
- Inherits:
-
Object
- Object
- Findr::Encoder
- 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
Constant Summary collapse
- @@strategy =
RUBY_VERSION < Findr::FIRST_RUBY_WITHOUT_ICONV ? Encoder::Iconv : Encoder::String
Instance Method Summary collapse
-
#initialize(other_codings) ⇒ Encoder
constructor
A new instance of Encoder.
Methods included from StrategyProxy
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 |