Skip to content

Commit

Permalink
Fix Rubocop Style/MethodMissing offense
Browse files Browse the repository at this point in the history
Add self.respond_to_missing? method to Config module.

But...

Due to this rubocop issue:
rubocop/rubocop#3358
an offense is still detected.
  • Loading branch information
Insti committed Aug 4, 2016
1 parent 396a83a commit 490b71a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/rubycritic/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ def self.set(options = {})
configuration.set(options)
end

# rubocop:disable Style/MethodMissing
def self.method_missing(method, *args, &block)
configuration.public_send(method, *args, &block)
if configuration
configuration.public_send(method, *args, &block)
else
super
end
end

def self.respond_to_missing?(symbol, include_all = false)
configuration.respond_to_missing?(symbol) || super
end
# rubocop:enable Style/MethodMissing
end
end

0 comments on commit 490b71a

Please sign in to comment.