Module: Spec::Runner::Formatter::NOOPMethodMissing

Included in:
HtmlFormatter, ProgressBarFormatter
Defined in:
lib/spec/runner/formatter/no_op_method_missing.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(sym, *args) ⇒ Object (private)



15
16
17
# File 'lib/spec/runner/formatter/no_op_method_missing.rb', line 15

def method_missing(sym, *args)
  # a no-op
end

Instance Method Details

#respond_to?(message, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
9
10
11
# File 'lib/spec/runner/formatter/no_op_method_missing.rb', line 5

def respond_to?(message, include_private = false)
  if include_private
    true
  else
    !private_methods.any? {|m| [message.to_s, message.to_sym].include?(m)}
  end
end