module ActivePattern::Comparator

Public Instance Methods

deconstruct() click to toggle source
Calls superclass method
# File lib/active_pattern/comparator.rb, line 3
def deconstruct
  matches = $_ACTIVE_PATTERN_MATCHES
  $_ACTIVE_PATTERN_MATCHES = nil
  return matches if matches.is_a?(Array)

  defined?(super) ? super : nil
end
deconstruct_keys(keys) click to toggle source
Calls superclass method
# File lib/active_pattern/comparator.rb, line 11
def deconstruct_keys(keys)
  matches = $_ACTIVE_PATTERN_MATCHES
  $_ACTIVE_PATTERN_MATCHES = nil
  return matches if matches.is_a?(Hash)

  defined?(super) ? super : nil
end