Module: Remarkable::Macros
- Defined in:
- lib/remarkable/macros.rb
Overview
This class is responsable for converting matchers to macros. You shouldn’t worry with what happens here, because it happens automatically.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_id, *args, &block) ⇒ Object (protected)
:nodoc:
9 10 11 12 13 14 15 16 17 |
# File 'lib/remarkable/macros.rb', line 9 def method_missing(method_id, *args, &block) #:nodoc: if method_id.to_s =~ /^(should_not|should)_(.+)/ should_or_should_not_method_missing($1, $2, caller, *args, &block) elsif method_id.to_s =~ /^x(should_not|should)_(.+)/ disabled_method_missing($1, $2, *args, &block) else super(method_id, *args, &block) end end |