Class: ROF::Translator

Inherits:
Object
  • Object
show all
Defined in:
lib/rof/translator.rb

Overview

TODO:

This is a work in progress; I will be normalizing the .call behavior.

A translator is responsible for converting the input into the given output. The input and output need not be the same type (e.g. CSV to Hash)

Class Method Summary collapse

Class Method Details

.call(input, config = {}) ⇒ Hash

Returns often times a Hash that can be serialized into JSON.

Parameters:

  • input (Object)
    • the thing that will be processed

  • config (Hash) (defaults to: {})
    • a Hash with symbol keys

Returns:

  • (Hash)

    often times a Hash that can be serialized into JSON

Raises:

  • (NotImplementedError)


14
15
16
# File 'lib/rof/translator.rb', line 14

def self.call(input, config = {})
  raise NotImplementedError
end