X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=doc%2FMCollective%2FMatcher.html;fp=doc%2Fclasses%2FMCollective%2FMatcher.html;h=69b8471bb40f1151d32f5498ee335ddc5acadf48;hb=7c9314f502cde8daad23b61d10b24a542e04154a;hp=1e8d9efd567b02654096636fafe4f8f78bc4c879;hpb=d1f1649ba43c5cbc43c4beb2380096ba051d646a;p=packages%2Fprecise%2Fmcollective.git diff --git a/doc/classes/MCollective/Matcher.html b/doc/MCollective/Matcher.html similarity index 59% rename from doc/classes/MCollective/Matcher.html rename to doc/MCollective/Matcher.html index 1e8d9ef..69b8471 100644 --- a/doc/classes/MCollective/Matcher.html +++ b/doc/MCollective/Matcher.html @@ -1,87 +1,349 @@ - - - + + - Module: MCollective::Matcher - - - - + + + Module: MCollective::Matcher + + + + + + + - - - - -
- - - - - - - - - - -
ModuleMCollective::Matcher
In: - - lib/mcollective/matcher/scanner.rb - -
- - lib/mcollective/matcher/parser.rb - -
- - lib/mcollective/matcher.rb - -
-
-
- - -
- - - -
- -
-

+ + +

+ + +
+ + + + + + +
+

Namespace

+ +
+ + + + + + + + + +
+ +
+ + + + + +
+

Class Index + [+]

+
+
+ Quicksearch + +
+
+ + + +
+ + +
+
+ +
+

MCollective::Matcher

+ +
+

A parser and scanner that creates a stack machine for a simple fact and class matching language used on the CLI to facilitate a rich discovery language @@ -90,71 +352,48 @@ language Language EBNF

-compound = ["("] expression [")"] {["("] -expression [")"]} expression = [!|not]statement -["and"|"or"] [!|not] statement char = A-Z | a-z | < -| > | => | =< | _ | - |* | / { A-Z | a-z | < | > | => | -=< | _ | - | * | / | } int = 0|1|2|3|4|5|6|7|8|9{|0|1|2|3|4|5|6|7|8|9|0} +compound = [“(“] expression [“)”] +{[“(“] expression [“)”]} expression = +[!|not]statement [“and”|“or”] [!|not] statement +char = A-Z | a-z | < | > | => | =< | _ | - |* | / { A-Z | a-z | < | > | => +| =< | _ | - | * | / | } int = 0|1|2|3|4|5|6|7|8|9{|0|1|2|3|4|5|6|7|8|9|0}

-
- - -
- - - -
- - - - -
+
-
-

Classes and Modules

+ + - Class MCollective::Matcher::Parser
-Class MCollective::Matcher::Scanner
+ + -
+ + +
+

Public Class Methods

+ +
+ +
+ + create_compound_callstack(call_string) + click to toggle source + +
- - - - - -
-

Public Class methods

- -
- - - - -
-

+

+ +

Creates a callstack to be evaluated from a compound evaluation string

-

[Source]

-
+ + + +
      # File lib/mcollective/matcher.rb, line 181
 181:     def self.create_compound_callstack(call_string)
@@ -165,28 +404,36 @@ Creates a callstack to be evaluated from a compound evaluation string
 186:         end
 187:       end
 188:       callstack
-189:     end
-
-
-
-
- -
- - - - -
-

+189: end +

+ +
+ + +
+ + +
+ + +
+ + create_function_hash(function_call) + click to toggle source + +
+ +
+ +

Helper creates a hash from a function call string

-

[Source]

-
+ + + +
     # File lib/mcollective/matcher.rb, line 17
 17:     def self.create_function_hash(function_call)
@@ -247,29 +494,37 @@ Helper creates a hash from a function call string
 72:       end
 73: 
 74:       func_hash
-75:     end
-
-
-
-
- -
- - - - -
-

+75: end +

+ +
+ + +
+ + +
+ + +
+ + eval_compound_fstatement(function_hash) + click to toggle source + +
+ +
+ +

Returns the result of an evaluated compound statement that includes a function

-

[Source]

-
+ + + +
      # File lib/mcollective/matcher.rb, line 135
 135:     def self.eval_compound_fstatement(function_hash)
@@ -315,28 +570,36 @@ function
 175:         result = eval("#{l_compare} #{function_hash["operator"]} #{function_hash["r_compare"]}")
 176:         (result.nil?) ? false : result
 177:       end
-178:     end
-
-
-
-
- -
- - - - -
-

+178: end +

+ +
+ + +
+ + +
+ + +
+ + eval_compound_statement(expression) + click to toggle source + +
+ +
+ +

Evaluates a compound statement

-

[Source]

-
+ + + +
      # File lib/mcollective/matcher.rb, line 115
 115:     def self.eval_compound_statement(expression)
@@ -355,28 +618,36 @@ Evaluates a compound statement
 128:       else
 129:         return Util.has_cf_class?(expression.values.first)
 130:       end
-131:     end
-
-
-
-
- -
- - - - -
-

+131: end +

+ +
+ + +
+ + +
+ + +
+ + execute_function(function_hash) + click to toggle source + +
+ +
+ +

Returns the result of an executed function

-

[Source]

-
+ + + +
      # File lib/mcollective/matcher.rb, line 78
  78:     def self.execute_function(function_hash)
@@ -413,22 +684,33 @@ Returns the result of an executed function
 109:     rescue NoMethodError
 110:       Log.debug("cannot execute discovery function '#{function_hash["name"]}'. data plugin not found")
 111:       raise DDLValidationError
-112:     end
-
-
-
-
+112: end +
+ +
+ +
-
+ +
+ +
-
+
+ +

Disabled; run with --debug to generate this.

+ +
-
-

[Validate]

-
+
+

[Validate]

+

Generated with the Darkfish + Rdoc Generator 1.1.6.

+
- \ No newline at end of file + +