Skip to content

Commit

Permalink
Merge 145203b into 0c8c125
Browse files Browse the repository at this point in the history
  • Loading branch information
jlduran committed Jan 6, 2019
2 parents 0c8c125 + 145203b commit 720683b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
2 changes: 0 additions & 2 deletions .rubocop.yml
@@ -1,5 +1,3 @@
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.3
Exclude:
Expand Down
17 changes: 0 additions & 17 deletions .rubocop_todo.yml

This file was deleted.

12 changes: 11 additions & 1 deletion lib/numbers_and_words/strategies/figures_converter/options.rb
Expand Up @@ -22,11 +22,21 @@ def initialize(strategy, options)
end

def method_missing(method_name, *args, &block)
Object.const_get(proxy_class_name(method_name)).new self, args, block
method = Object.const_get(proxy_class_name(method_name))

if method
method.new(self, args, block)
else
super
end
rescue NameError
nil
end

def respond_to_missing?(method_name, include_private = false)
Object.const_get(proxy_class_name(method_name)) || super
end

private

def proxy_class_name(method_name)
Expand Down

0 comments on commit 720683b

Please sign in to comment.