lib/fixer_upper.rb in fixer_upper-0.3.0 vs lib/fixer_upper.rb in fixer_upper-0.4.0
- old
+ new
@@ -1,5 +1,6 @@
+require "fixer_upper/contractor"
require "fixer_upper/error"
require "fixer_upper/renovation"
require "fixer_upper/version"
class FixerUpper
@@ -18,31 +19,45 @@
def for(key)
@engine_registry[key]
end
- def renovate(filepath, contents = nil, **options)
+ def renovate(filepath, contents = nil, **options, &block)
@renovation.renovate(
filepath: filepath,
text: contents,
options: options,
+ block: block,
bang: false
)
end
- def renovate!(filepath, contents = nil, **options)
+ def renovate!(filepath, contents = nil, **options, &block)
@renovation.renovate(
filepath: filepath,
text: contents,
options: options,
+ block: block,
bang: true
)
end
- def diy(text, *engines, **options)
- @renovation.diy(text: text, engines: engines, options: options, bang: false)
+ def diy(text, *engines, **options, &block)
+ @renovation.diy(
+ text: text,
+ engines: engines,
+ options: options,
+ block: block,
+ bang: false
+ )
end
- def diy!(text, *engines, **options)
- @renovation.diy(text: text, engines: engines, options: options, bang: true)
+ def diy!(text, *engines, **options, &block)
+ @renovation.diy(
+ text: text,
+ engines: engines,
+ options: options,
+ block: block,
+ bang: true
+ )
end
end