Class | Ohcount::Gestalt::Platform
In: | lib/gestalt/platform.rb
Parent: | Object

### Methods

children descendants inherited method_missing top_level_or triggered?

### Public Class methods

children()

[Source]

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

descendants()

[Source]

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

inherited(other)

[Source]

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

method_missing(method, *args)

we delegate to the top_level_or trigger

[Source]

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

top_level_or()

platform 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/platform.rb, line 21
                            def self.top_level_or
                                    @top_level_or ||= OrRule.new
                            end

triggered?(g)

[Source]

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

[Validate]