Module: Reflekt::SingletonClassMethods

Defined in:
lib/reflekt.rb

Overview

Publicly accessible class methods in the class that Reflekt is prepended to.

Constant Summary collapse

@@reflekt_skipped_methods =
Set.new()

Instance Method Summary collapse

Instance Method Details

#reflekt_skip(method) ⇒ Object

Note:

Class variables cascade to child classes. So a reflekt_skip on the parent class will persist to the child class.

Skip a method.

Parameters:

  • method (Symbol)

    The method name.


267
268
269
# File 'lib/reflekt.rb', line 267

def reflekt_skip(method)
  @@reflekt_skipped_methods.add(method)
end

#reflekt_skipped?(method) ⇒ Boolean

Returns:

  • (Boolean)

271
272
273
274
# File 'lib/reflekt.rb', line 271

def reflekt_skipped?(method)
  return true if @@reflekt_skipped_methods.include?(method)
  false
end