lib/autobuild/rake_task_extension.rb in autobuild-1.17.0 vs lib/autobuild/rake_task_extension.rb in autobuild-1.18.0
- old
+ new
@@ -1,19 +1,19 @@
module Autobuild
module RakeTaskExtension
def already_invoked?
- !!@already_invoked
+ @already_invoked
end
- def already_invoked=(value)
- @already_invoked = value
- end
+ attr_writer :already_invoked
def disable!
@already_invoked = true
- def self.needed?; false end
+ singleton_class.class_eval do
+ define_method(:needed?) { false }
+ end
end
end
end
-class Rake::Task
+class Rake::Task # rubocop:disable Style/ClassAndModuleChildren
include Autobuild::RakeTaskExtension
end