Class | Ohcount::Gestalt::CKeywordRule
In: | lib/gestalt/rules/c_keyword_rule.rb
Parent: | KeywordRule

### Methods

new trigger_file?

### Public Class methods

new(*keywords)

[Source]

    # File lib/gestalt/rules/c_keyword_rule.rb, line 5
                            def initialize(*keywords)
                                    super('c',*keywords)
                            end

### Public Instance methods

trigger_file?(source_file)

[Source]

    # File lib/gestalt/rules/c_keyword_rule.rb, line 9
                            def trigger_file?(source_file)
                                    return false unless ['c','cpp'].include?(source_file.polyglot)
                                    regexp.match(source_file.language_breakdown('c').code) ||
                                            regexp.match(source_file.language_breakdown('cpp').code)
                            end

[Validate]