Module: Remarkable::Macros

Included in:
PendingSandbox
Defined in:
lib/remarkable/macros.rb,
lib/remarkable/pending.rb

Defined Under Namespace

Classes: PendingSandbox

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_id, *args, &block) ⇒ Object (protected)

:nodoc:



6
7
8
9
10
11
12
13
14
# File 'lib/remarkable/macros.rb', line 6

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