class Enzymator::Transformations::Base
Public Class Methods
new(config = {})
click to toggle source
# File lib/enzymator/transformations/base.rb, line 9 def initialize(config = {}) @config = Config.new(interpreted(@@default_config.merge(config))) end
Public Instance Methods
run_on(object)
click to toggle source
# File lib/enzymator/transformations/base.rb, line 18 def run_on(object) Categorizer.categorize(object.class) do_run_on(object) end
run_on_all(*objects)
click to toggle source
# File lib/enzymator/transformations/base.rb, line 13 def run_on_all(*objects) # when threads are implemented, the original order must be preserved objects.map { |object| run_on(object) } end
Private Instance Methods
do_run_on(object)
click to toggle source
# File lib/enzymator/transformations/base.rb, line 29 def do_run_on(object) transformer.transform(object) end
interpreted(config)
click to toggle source
# File lib/enzymator/transformations/base.rb, line 25 def interpreted(config) config end
transformer()
click to toggle source
# File lib/enzymator/transformations/base.rb, line 33 def transformer transformer_class.new(@config) end