Class: CheapCoder::NodeDetector::Condition

Inherits:
Base
  • Object
show all
Defined in:
lib/cheap_coder/node_detector/condition.rb

Instance Attribute Summary

Attributes inherited from Base

#score

Instance Method Summary collapse

Methods inherited from Base

#check, #initialize, #print_debug

Constructor Details

This class inherits a constructor from CheapCoder::NodeDetector::Base

Instance Method Details

#detected?(node) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/cheap_coder/node_detector/condition.rb', line 10

def detected?(node)
  CONDITION_NODES.include?(node.type)
end