Class: Estratto::Encoder
- Inherits:
-
Object
- Object
- Estratto::Encoder
- Defined in:
- lib/estratto/encoder.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
- #encode ⇒ Object
-
#initialize(content) ⇒ Encoder
constructor
A new instance of Encoder.
Constructor Details
#initialize(content) ⇒ Encoder
Returns a new instance of Encoder.
7 8 9 |
# File 'lib/estratto/encoder.rb', line 7 def initialize(content) @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
5 6 7 |
# File 'lib/estratto/encoder.rb', line 5 def content @content end |
Instance Method Details
#encode ⇒ Object
11 12 13 |
# File 'lib/estratto/encoder.rb', line 11 def encode CharlockHolmes::Converter.convert(content, encoding, 'UTF-8') end |