class Plaintext::PlaintextHandler

Constants

CONTENT_TYPES

Public Class Methods

new() click to toggle source
# File lib/plaintext/file_handler/plaintext_handler.rb, line 7
def initialize
  @content_types = CONTENT_TYPES
end

Public Instance Methods

text(file, options = {}) click to toggle source
# File lib/plaintext/file_handler/plaintext_handler.rb, line 11
def text(file, options = {})
  max_size = options[:max_size]
  Plaintext::CodesetUtil.to_utf8 IO.read(file, max_size), 'UTF-8'
end