Class | Ohcount::Gestalt::Tool
In: | lib/gestalt/tool.rb
Parent: | Object

### Methods

children descendants inherited method_missing top_level_or triggered?

### Public Class methods

children()

[Source]

    # File lib/gestalt/tool.rb, line 23
                                    def children() @children ||= [] end

descendants()

[Source]

    # File lib/gestalt/tool.rb, line 25
                                    def descendants() children.inject([]){|d,c| d.push(c, *c.descendants)} end

inherited(other)

[Source]

    # File lib/gestalt/tool.rb, line 24
                                    def inherited(other) children << other and super end

method_missing(method, *args)

we delegate to the top_level_or trigger

[Source]

    # File lib/gestalt/tool.rb, line 13
                            def self.method_missing(method, *args)
                                    top_level_or.send(method, *args)
                            end

top_level_or()

tool rules are assumed to be, at the top level, OR-ed. In other words, any one rule will trigger that platform. That‘s why we keep a top-level OrRule around.

[Source]

    # File lib/gestalt/tool.rb, line 8
                            def self.top_level_or
                                    @top_level_or ||= OrRule.new
                            end

triggered?(g)

[Source]

    # File lib/gestalt/tool.rb, line 17
                            def self.triggered?(g)
                                    top_level_or.triggered?(g)
                            end

[Validate]