class Retl::Handler
Attributes
description[RW]
Public Class Methods
new()
click to toggle source
# File lib/retl/handlers/handler.rb, line 5 def initialize @output = [] @description = "unknown" end
Public Instance Methods
call(data, context)
click to toggle source
# File lib/retl/handlers/handler.rb, line 18 def call(data, context) raise NotImplementedError, "Handlers much implement the #push_in(data, context) method" end
output()
click to toggle source
# File lib/retl/handlers/handler.rb, line 10 def output @output.slice!(0, @output.count) end
push_in(data, context)
click to toggle source
# File lib/retl/handlers/handler.rb, line 14 def push_in(data, context) call(data, context) end
Private Instance Methods
push_out(data)
click to toggle source
# File lib/retl/handlers/handler.rb, line 24 def push_out(data) @output.push data end