Class: ANSEL::Iconv

Inherits:
Object
  • Object
show all
Defined in:
lib/ansel_iconv/iconv.rb,
lib/ansel_iconv/version.rb

Constant Summary collapse

VERSION =
'1.1.6'

Instance Method Summary collapse

Constructor Details

#initialize(to, from = 'ANSEL') ⇒ Iconv

Returns a new instance of Iconv.


5
6
7
# File 'lib/ansel_iconv/iconv.rb', line 5

def initialize(to, from = 'ANSEL')
  @converter = (from == 'ANSEL') ? Convert.new(to) : ::Iconv.new(to, from)
end

Instance Method Details

#iconv(*args) ⇒ Object


9
10
11
# File 'lib/ansel_iconv/iconv.rb', line 9

def iconv(*args)
  @converter.iconv(*args)
end