class Threatinator::Decoder
Decodes/Extracts data from an input IO, producing a new IO. The decoder is initialized with a configuration, and then decode
is called upon an IO object.
Attributes
encoding[R]
Public Class Methods
new(opts = {})
click to toggle source
@param [Hash] opts An options hash @option opts [String] :encoding The encoding for the output IO. Defaults
to "utf-8"
# File lib/threatinator/decoder.rb, line 11 def initialize(opts = {}) @encoding = opts[:encoding] || "utf-8" end
Public Instance Methods
decode(io)
click to toggle source
Decodes an input IO, returning a brand new IO. @param [IO] io The IO to decode @return [IO] A new IO.
# File lib/threatinator/decoder.rb, line 18 def decode(io) #:nocov: raise NotImplementedError.new("#{self.class}#decode not implemented!") #:nocov: end