Module: Assert::Context::MethodMissing

Included in:
Assert::Context
Defined in:
lib/assert/context/method_missing.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/assert/context/method_missing.rb', line 9

def method_missing(method, *args, &block)
  if Assert::Assertions::IGNORED_ASSERTION_HELPERS.include?(method.to_sym)
    ignore "The assertion `#{method}` is not supported."\
           " Please use another assertion or the basic `assert`."
  else
    super
  end
end

Instance Method Details

#respond_to_missing?(method) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
21
# File 'lib/assert/context/method_missing.rb', line 18

def respond_to_missing?(method, *)
  Assert::Assertions::IGNORED_ASSERTION_HELPERS.include?(method.to_sym) ||
  super
end