Module: Ab::MissingVariant

Included in:
AssignedTest, NullTest
Defined in:
lib/ab/missing_variant.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



3
4
5
6
7
8
9
10
# File 'lib/ab/missing_variant.rb', line 3

def method_missing(meth, *args, &block)
  if variant_method?(meth)
    log_missing_variant(meth)
    false
  else
    super
  end
end

Instance Method Details

#respond_to_missing?(meth) ⇒ Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/ab/missing_variant.rb', line 12

def respond_to_missing?(meth, *)
  variant_method?(meth) ? true : super
end