Class | Ohcount::Gestalt::LogicalRule
In: | lib/gestalt/rules/logical_rule.rb
Parent: | Rule

### Methods

_and _or c_headers c_keywords filenames java_import language method_missing new new_rule platform

### Attributes

rules | [R] |

### Public Class methods

new(*rules)

[Source]

    # File lib/gestalt/rules/logical_rule.rb, line 6
                            def initialize(*rules)
                                    @rules = rules
                            end

### Public Instance methods

_and(*args)

[Source]

    # File lib/gestalt/rules/logical_rule.rb, line 26
                            def _and(*args)
                                    new_rule AndRule, *args
                            end

_or(*args)

[Source]

    # File lib/gestalt/rules/logical_rule.rb, line 22
                            def _or(*args)
                                    new_rule OrRule, *args
                            end

c_headers(*args)

file rules

[Source]

    # File lib/gestalt/rules/logical_rule.rb, line 39
                            def c_headers(*args)
                                    new_rule CHeaderRule, *args
                            end

c_keywords(*args)

[Source]

    # File lib/gestalt/rules/logical_rule.rb, line 47
                            def c_keywords(*args)
                                    new_rule CKeywordRule, *args
                            end

filenames(*args)

[Source]

    # File lib/gestalt/rules/logical_rule.rb, line 43
                            def filenames(*args)
                                    new_rule FilenameRule, *args
                            end

java_import(*args)

[Source]

    # File lib/gestalt/rules/logical_rule.rb, line 51
                            def java_import(*args)
                                    new_rule JavaImportRule, *args
                            end

language(*args)

[Source]

    # File lib/gestalt/rules/logical_rule.rb, line 34
                            def language(*args)
                                    new_rule LanguageRule, *args
                            end

method_missing(m,*args)

[Source]

    # File lib/gestalt/rules/logical_rule.rb, line 55
                            def method_missing(m,*args)
                                    if /(.*)_keywords$/ =~ m.to_s
                                            language = $1
                                            new_args = [language] + args
                                            return new_rule(KeywordRule, *new_args)
                                    end
                                    super
                            end

new_rule(r_class, *args)

[Source]

    # File lib/gestalt/rules/logical_rule.rb, line 10
                            def new_rule(r_class, *args)
                                    # since we might be nesting logical rules, we must remove
                                    # any 'grandchildren rules' from our list, since we are giving
                                    args.each do |a|
                                            next unless a.is_a?(Rule)
                                            @rules.delete(a)
                                    end
                                    r = r_class.new(*args)
                                    @rules << r
                                    r
                            end

platform(*args)

[Source]

    # File lib/gestalt/rules/logical_rule.rb, line 30
                            def platform(*args)
                                    new_rule PlatformRule, *args
                            end

[Validate]