class Jsonsql::Transformer
Public Class Methods
new(&block)
click to toggle source
# File lib/jsonsql/transformer.rb, line 3 def initialize(&block) @transformation = block end
transformer_with_string(string)
click to toggle source
# File lib/jsonsql/transformer.rb, line 11 def self.transformer_with_string(string) block = eval(string) Transformer.new(&block) end
Public Instance Methods
transform(row)
click to toggle source
# File lib/jsonsql/transformer.rb, line 7 def transform(row) self.instance_exec(row, &@transformation) end