lib/fixer_upper.rb in fixer_upper-0.1.0 vs lib/fixer_upper.rb in fixer_upper-0.2.0

- old
+ new

@@ -3,19 +3,22 @@ require "fixer_upper/version" class FixerUpper def initialize @engine_registry = {} - @renovation = Renovation.new(@engine_registry) + @options_registry = {} + @renovation = Renovation.new(@engine_registry, @options_registry) end - def []=(*keys, engine) + def register(*keys, to:, **options) keys.each do |key| - @engine_registry[key] = engine + @engine_registry[key] = to end + + @options_registry[to] = options end - def [](key) + def for(key) @engine_registry[key] end def renovate(filepath, contents = nil) @renovation.renovate(filepath, contents, bang: false)