-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
- <title>Class: MCollective::Optionparser</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
- <script type="text/javascript">
- // <![CDATA[
-
- function popupCode( url ) {
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
- }
-
- function toggleCode( id ) {
- if ( document.getElementById )
- elem = document.getElementById( id );
- else if ( document.all )
- elem = eval( "document.all." + id );
- else
- return false;
-
- elemStyle = elem.style;
-
- if ( elemStyle.display != "block" ) {
- elemStyle.display = "block"
- } else {
- elemStyle.display = "none"
- }
-
- return true;
- }
-
- // Make codeblocks hidden by default
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
-
- // ]]>
- </script>
-
-</head>
-<body>
-
-
-
- <div id="classHeader">
- <table class="header-table">
- <tr class="top-aligned-row">
- <td><strong>Class</strong></td>
- <td class="class-name-in-header">MCollective::Optionparser</td>
- </tr>
- <tr class="top-aligned-row">
- <td><strong>In:</strong></td>
- <td>
- <a href="../../files/lib/mcollective/optionparser_rb.html">
- lib/mcollective/optionparser.rb
- </a>
- <br />
- </td>
- </tr>
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
- <tr class="top-aligned-row">
- <td><strong>Parent:</strong></td>
- <td>
- Object
- </td>
- </tr>
- </table>
- </div>
- <!-- banner header -->
+ <title>Class: MCollective::Optionparser</title>
- <div id="bodyContent">
+ <link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
+ <script src="../js/jquery.js" type="text/javascript"
+ charset="utf-8"></script>
+ <script src="../js/thickbox-compressed.js" type="text/javascript"
+ charset="utf-8"></script>
+ <script src="../js/quicksearch.js" type="text/javascript"
+ charset="utf-8"></script>
+ <script src="../js/darkfish.js" type="text/javascript"
+ charset="utf-8"></script>
-
- <div id="contextContent">
-
- <div id="description">
- <p>
+</head>
+<body class="class">
+
+ <div id="metadata">
+ <div id="file-metadata">
+ <div id="file-list-section" class="section">
+ <h3 class="section-header">In Files</h3>
+ <div class="section-body">
+ <ul>
+
+ <li><a href="../lib/mcollective/optionparser_rb.html?TB_iframe=true&height=550&width=785"
+ class="thickbox" title="lib/mcollective/optionparser.rb">lib/mcollective/optionparser.rb</a></li>
+
+ </ul>
+ </div>
+ </div>
+
+
+ </div>
+
+ <div id="class-metadata">
+
+ <!-- Parent Class -->
+
+ <div id="parent-class-section" class="section">
+ <h3 class="section-header">Parent</h3>
+
+ <p class="link"><a href="../Object.html">Object</a></p>
+
+ </div>
+
+
+ <!-- Namespace Contents -->
+
+
+ <!-- Method Quickref -->
+
+ <div id="method-list-section" class="section">
+ <h3 class="section-header">Methods</h3>
+ <ul class="link-list">
+
+ <li><a href="#M000020">::new</a></li>
+
+ <li><a href="#M000031">#add_common_options</a></li>
+
+ <li><a href="#M000024">#add_filter_options</a></li>
+
+ <li><a href="#M000028">#add_required_options</a></li>
+
+ <li><a href="#M000021">#parse</a></li>
+
+ <li><a href="#M000032">#parse_fact</a></li>
+
+ </ul>
+ </div>
+
+
+ <!-- Included Modules -->
+
+ </div>
+
+ <div id="project-metadata">
+
+
+ <div id="fileindex-section" class="section project-section">
+ <h3 class="section-header">Files</h3>
+ <ul>
+
+ <li class="file"><a href="../COPYING.html">COPYING</a></li>
+
+ <li class="file"><a href="../Gemfile.html">Gemfile</a></li>
+
+ <li class="file"><a href="../README.html">README</a></li>
+
+ <li class="file"><a href="../Rakefile.html">Rakefile</a></li>
+
+ <li class="file"><a href="../etc/client_cfg_dist.html">client.cfg.dist</a></li>
+
+ <li class="file"><a href="../etc/data-help_erb.html">data-help.erb</a></li>
+
+ <li class="file"><a href="../etc/discovery-help_erb.html">discovery-help.erb</a></li>
+
+ <li class="file"><a href="../etc/facts_yaml_dist.html">facts.yaml.dist</a></li>
+
+ <li class="file"><a href="../etc/metadata-help_erb.html">metadata-help.erb</a></li>
+
+ <li class="file"><a href="../etc/msg-help_erb.html">msg-help.erb</a></li>
+
+ <li class="file"><a href="../etc/rpc-help_erb.html">rpc-help.erb</a></li>
+
+ <li class="file"><a href="../etc/server_cfg_dist.html">server.cfg.dist</a></li>
+
+ <li class="file"><a href="../etc/ssl/PLACEHOLDER.html">PLACEHOLDER</a></li>
+
+ <li class="file"><a href="../etc/ssl/clients/PLACEHOLDER.html">PLACEHOLDER</a></li>
+
+ <li class="file"><a href="../lib/mcollective/generators/templates/action_snippet_erb.html">action_snippet.erb</a></li>
+
+ <li class="file"><a href="../lib/mcollective/generators/templates/data_input_snippet_erb.html">data_input_snippet.erb</a></li>
+
+ <li class="file"><a href="../lib/mcollective/generators/templates/ddl_erb.html">ddl.erb</a></li>
+
+ <li class="file"><a href="../lib/mcollective/generators/templates/plugin_erb.html">plugin.erb</a></li>
+
+ <li class="file"><a href="../lib/mcollective/locales/en_yml.html">en.yml</a></li>
+
+ <li class="file"><a href="../mcollective_init.html">mcollective.init</a></li>
+
+ </ul>
+ </div>
+
+
+ <div id="classindex-section" class="section project-section">
+ <h3 class="section-header">Class Index
+ <span class="search-toggle"><img src="../images/find.png"
+ height="16" width="16" alt="[+]"
+ title="show/hide quicksearch" /></span></h3>
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
+ <fieldset>
+ <legend>Quicksearch</legend>
+ <input type="text" name="quicksearch" value=""
+ class="quicksearch-field" />
+ </fieldset>
+ </form>
+
+ <ul class="link-list">
+
+ <li><a href="../MCollective.html">MCollective</a></li>
+
+ <li><a href="../MCollective/Agent.html">MCollective::Agent</a></li>
+
+ <li><a href="../MCollective/Agents.html">MCollective::Agents</a></li>
+
+ <li><a href="../MCollective/Aggregate.html">MCollective::Aggregate</a></li>
+
+ <li><a href="../MCollective/Aggregate/Base.html">MCollective::Aggregate::Base</a></li>
+
+ <li><a href="../MCollective/Aggregate/Result.html">MCollective::Aggregate::Result</a></li>
+
+ <li><a href="../MCollective/Aggregate/Result/Base.html">MCollective::Aggregate::Result::Base</a></li>
+
+ <li><a href="../MCollective/Aggregate/Result/CollectionResult.html">MCollective::Aggregate::Result::CollectionResult</a></li>
+
+ <li><a href="../MCollective/Aggregate/Result/NumericResult.html">MCollective::Aggregate::Result::NumericResult</a></li>
+
+ <li><a href="../MCollective/Application.html">MCollective::Application</a></li>
+
+ <li><a href="../MCollective/Applications.html">MCollective::Applications</a></li>
+
+ <li><a href="../MCollective/Cache.html">MCollective::Cache</a></li>
+
+ <li><a href="../MCollective/Client.html">MCollective::Client</a></li>
+
+ <li><a href="../MCollective/CodedError.html">MCollective::CodedError</a></li>
+
+ <li><a href="../MCollective/Config.html">MCollective::Config</a></li>
+
+ <li><a href="../MCollective/Connector.html">MCollective::Connector</a></li>
+
+ <li><a href="../MCollective/Connector/Base.html">MCollective::Connector::Base</a></li>
+
+ <li><a href="../MCollective/DDL.html">MCollective::DDL</a></li>
+
+ <li><a href="../MCollective/DDL/AgentDDL.html">MCollective::DDL::AgentDDL</a></li>
+
+ <li><a href="../MCollective/DDL/Base.html">MCollective::DDL::Base</a></li>
+
+ <li><a href="../MCollective/DDL/DataDDL.html">MCollective::DDL::DataDDL</a></li>
+
+ <li><a href="../MCollective/DDL/DiscoveryDDL.html">MCollective::DDL::DiscoveryDDL</a></li>
+
+ <li><a href="../MCollective/DDL/ValidatorDDL.html">MCollective::DDL::ValidatorDDL</a></li>
+
+ <li><a href="../MCollective/DDLValidationError.html">MCollective::DDLValidationError</a></li>
+
+ <li><a href="../MCollective/Data.html">MCollective::Data</a></li>
+
+ <li><a href="../MCollective/Data/Base.html">MCollective::Data::Base</a></li>
+
+ <li><a href="../MCollective/Data/Result.html">MCollective::Data::Result</a></li>
+
+ <li><a href="../MCollective/Discovery.html">MCollective::Discovery</a></li>
+
+ <li><a href="../MCollective/Facts.html">MCollective::Facts</a></li>
+
+ <li><a href="../MCollective/Facts/Base.html">MCollective::Facts::Base</a></li>
+
+ <li><a href="../MCollective/Generators.html">MCollective::Generators</a></li>
+
+ <li><a href="../MCollective/Generators/AgentGenerator.html">MCollective::Generators::AgentGenerator</a></li>
+
+ <li><a href="../MCollective/Generators/Base.html">MCollective::Generators::Base</a></li>
+
+ <li><a href="../MCollective/Generators/DataGenerator.html">MCollective::Generators::DataGenerator</a></li>
+
+ <li><a href="../MCollective/InvalidRPCData.html">MCollective::InvalidRPCData</a></li>
+
+ <li><a href="../MCollective/Log.html">MCollective::Log</a></li>
+
+ <li><a href="../MCollective/Logger.html">MCollective::Logger</a></li>
+
+ <li><a href="../MCollective/Logger/Base.html">MCollective::Logger::Base</a></li>
+
+ <li><a href="../MCollective/Logger/Console_logger.html">MCollective::Logger::Console_logger</a></li>
+
+ <li><a href="../MCollective/Logger/File_logger.html">MCollective::Logger::File_logger</a></li>
+
+ <li><a href="../MCollective/Logger/Syslog_logger.html">MCollective::Logger::Syslog_logger</a></li>
+
+ <li><a href="../MCollective/Matcher.html">MCollective::Matcher</a></li>
+
+ <li><a href="../MCollective/Matcher/Parser.html">MCollective::Matcher::Parser</a></li>
+
+ <li><a href="../MCollective/Matcher/Scanner.html">MCollective::Matcher::Scanner</a></li>
+
+ <li><a href="../MCollective/Message.html">MCollective::Message</a></li>
+
+ <li><a href="../MCollective/MissingRPCData.html">MCollective::MissingRPCData</a></li>
+
+ <li><a href="../MCollective/MsgDoesNotMatchRequestID.html">MCollective::MsgDoesNotMatchRequestID</a></li>
+
+ <li><a href="../MCollective/MsgTTLExpired.html">MCollective::MsgTTLExpired</a></li>
+
+ <li><a href="../MCollective/NotTargettedAtUs.html">MCollective::NotTargettedAtUs</a></li>
+
+ <li><a href="../MCollective/Optionparser.html">MCollective::Optionparser</a></li>
+
+ <li><a href="../MCollective/PluginManager.html">MCollective::PluginManager</a></li>
+
+ <li><a href="../MCollective/PluginPackager.html">MCollective::PluginPackager</a></li>
+
+ <li><a href="../MCollective/PluginPackager/AgentDefinition.html">MCollective::PluginPackager::AgentDefinition</a></li>
+
+ <li><a href="../MCollective/PluginPackager/StandardDefinition.html">MCollective::PluginPackager::StandardDefinition</a></li>
+
+ <li><a href="../MCollective/RPC.html">MCollective::RPC</a></li>
+
+ <li><a href="../MCollective/RPC/ActionRunner.html">MCollective::RPC::ActionRunner</a></li>
+
+ <li><a href="../MCollective/RPC/Agent.html">MCollective::RPC::Agent</a></li>
+
+ <li><a href="../MCollective/RPC/Audit.html">MCollective::RPC::Audit</a></li>
+
+ <li><a href="../MCollective/RPC/Client.html">MCollective::RPC::Client</a></li>
+
+ <li><a href="../MCollective/RPC/Helpers.html">MCollective::RPC::Helpers</a></li>
+
+ <li><a href="../MCollective/RPC/Progress.html">MCollective::RPC::Progress</a></li>
+
+ <li><a href="../MCollective/RPC/Reply.html">MCollective::RPC::Reply</a></li>
+
+ <li><a href="../MCollective/RPC/Request.html">MCollective::RPC::Request</a></li>
+
+ <li><a href="../MCollective/RPC/Result.html">MCollective::RPC::Result</a></li>
+
+ <li><a href="../MCollective/RPC/Stats.html">MCollective::RPC::Stats</a></li>
+
+ <li><a href="../MCollective/RPCAborted.html">MCollective::RPCAborted</a></li>
+
+ <li><a href="../MCollective/RPCError.html">MCollective::RPCError</a></li>
+
+ <li><a href="../MCollective/Registration.html">MCollective::Registration</a></li>
+
+ <li><a href="../MCollective/Registration/Base.html">MCollective::Registration::Base</a></li>
+
+ <li><a href="../MCollective/Runner.html">MCollective::Runner</a></li>
+
+ <li><a href="../MCollective/RunnerStats.html">MCollective::RunnerStats</a></li>
+
+ <li><a href="../MCollective/SSL.html">MCollective::SSL</a></li>
+
+ <li><a href="../MCollective/Security.html">MCollective::Security</a></li>
+
+ <li><a href="../MCollective/Security/Base.html">MCollective::Security::Base</a></li>
+
+ <li><a href="../MCollective/SecurityValidationFailed.html">MCollective::SecurityValidationFailed</a></li>
+
+ <li><a href="../MCollective/Shell.html">MCollective::Shell</a></li>
+
+ <li><a href="../MCollective/Translatable.html">MCollective::Translatable</a></li>
+
+ <li><a href="../MCollective/UnixDaemon.html">MCollective::UnixDaemon</a></li>
+
+ <li><a href="../MCollective/UnknownRPCAction.html">MCollective::UnknownRPCAction</a></li>
+
+ <li><a href="../MCollective/UnknownRPCError.html">MCollective::UnknownRPCError</a></li>
+
+ <li><a href="../MCollective/Util.html">MCollective::Util</a></li>
+
+ <li><a href="../MCollective/Validator.html">MCollective::Validator</a></li>
+
+ <li><a href="../MCollective/ValidatorError.html">MCollective::ValidatorError</a></li>
+
+ <li><a href="../MCollective/WindowsDaemon.html">MCollective::WindowsDaemon</a></li>
+
+ <li><a href="../Array.html">Array</a></li>
+
+ <li><a href="../Dir.html">Dir</a></li>
+
+ <li><a href="../Object.html">Object</a></li>
+
+ <li><a href="../String.html">String</a></li>
+
+ <li><a href="../Symbol.html">Symbol</a></li>
+
+ </ul>
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
+ </div>
+
+
+ </div>
+ </div>
+
+ <div id="documentation">
+ <h1 class="class">MCollective::Optionparser</h1>
+
+ <div id="description">
+ <p>
A simple helper to build cli tools that supports a uniform command line
layout.
</p>
- </div>
-
-
- </div>
-
- <div id="method-list">
- <h3 class="section-bar">Methods</h3>
-
- <div class="name-list">
- <a href="#M000455">add_common_options</a>
- <a href="#M000453">add_filter_options</a>
- <a href="#M000454">add_required_options</a>
- <a href="#M000451">new</a>
- <a href="#M000452">parse</a>
- </div>
- </div>
-
- </div>
-
-
- <!-- if includes -->
-
- <div id="section">
-
-
-
-
-
- <div id="attribute-list">
- <h3 class="section-bar">Attributes</h3>
-
- <div class="name-list">
- <table>
- <tr class="top-aligned-row context-row">
- <td class="context-item-name">parser</td>
- <td class="context-item-value"> [R] </td>
- <td class="context-item-desc"></td>
- </tr>
- </table>
- </div>
- </div>
-
-
-
- <!-- if method_list -->
- <div id="methods">
- <h3 class="section-bar">Public Class methods</h3>
-
- <div id="method-M000451" class="method-detail">
- <a name="M000451"></a>
-
- <div class="method-heading">
- <a href="#M000451" class="method-signature">
- <span class="method-name">new</span><span class="method-args">(defaults = {}, include_sections = nil, exclude_sections = nil)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Creates a <a href="Optionparser.html#M000451">new</a> instance of the
-parser, you can supply defaults and include named groups of options.
+ </div>
+
+ <!-- Constants -->
+
+
+ <!-- Attributes -->
+
+ <div id="attribute-method-details" class="method-section section">
+ <h3 class="section-header">Attributes</h3>
+
+
+ <div id="parser-attribute-method" class="method-detail">
+ <a name="parser"></a>
+
+ <div class="method-heading attribute-method-heading">
+ <span class="method-name">parser</span><span
+ class="attribute-access-type">[R]</span>
+ </div>
+
+ <div class="method-description">
+
+ <p class="missing-docs">(Not documented)</p>
+
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- Methods -->
+
+ <div id="public-class-method-details" class="method-section section">
+ <h3 class="section-header">Public Class Methods</h3>
+
+
+ <div id="new-method" class="method-detail ">
+ <a name="M000020"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">new</span><span
+ class="method-args">(defaults = {}, include_sections = nil, exclude_sections = nil)</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Creates a new instance of the parser, you can supply defaults and include
+named groups of options.
</p>
<p>
Starts a parser that defaults to verbose and that includs the filter
<pre>
oparser = MCollective::Optionparser.new({:verbose => true}, "filter", "common")
</pre>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000451-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000451-source">
+
+
+
+ <div class="method-source-code"
+ id="new-source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/optionparser.rb, line 20</span>
20: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">defaults</span> = {}, <span class="ruby-identifier">include_sections</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">exclude_sections</span> = <span class="ruby-keyword kw">nil</span>)
26: <span class="ruby-ivar">@options</span> = <span class="ruby-constant">Util</span>.<span class="ruby-identifier">default_options</span>
27:
28: <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">merge!</span>(<span class="ruby-identifier">defaults</span>)
-29: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <h3 class="section-bar">Public Instance methods</h3>
-
- <div id="method-M000455" class="method-detail">
- <a name="M000455"></a>
-
- <div class="method-heading">
- <a href="#M000455" class="method-signature">
- <span class="method-name">add_common_options</span><span class="method-args">()</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
+29: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+ <div id="public-instance-method-details" class="method-section section">
+ <h3 class="section-header">Public Instance Methods</h3>
+
+
+ <div id="add-common-options-method" class="method-detail ">
+ <a name="M000031"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">add_common_options</span><span
+ class="method-args">()</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
These options will be added to most cli tools
</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000455-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000455-source">
+
+
+
+ <div class="method-source-code"
+ id="add-common-options-source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/optionparser.rb, line 128</span>
128: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_common_options</span>
177: <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">on</span>(<span class="ruby-value str">"--threaded"</span>, <span class="ruby-value str">"Start publishing requests and receiving responses in threaded mode."</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
178: <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:threaded</span>] = <span class="ruby-keyword kw">true</span>
179: <span class="ruby-keyword kw">end</span>
-180: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000453" class="method-detail">
- <a name="M000453"></a>
-
- <div class="method-heading">
- <a href="#M000453" class="method-signature">
- <span class="method-name">add_filter_options</span><span class="method-args">()</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
+180: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <div id="add-filter-options-method" class="method-detail ">
+ <a name="M000024"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">add_filter_options</span><span
+ class="method-args">()</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
These options will be added if you pass ‘filter’ into the
include list of the constructor.
</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000453-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000453-source">
+
+
+
+ <div class="method-source-code"
+ id="add-filter-options-source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/optionparser.rb, line 73</span>
73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_filter_options</span>
106: <span class="ruby-ivar">@parser</span>.<span class="ruby-identifier">on</span>(<span class="ruby-value str">'-I'</span>, <span class="ruby-value str">'--wi'</span>, <span class="ruby-value str">'--with-identity IDENT'</span>, <span class="ruby-value str">'Match hosts with a certain configured identity'</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span>
107: <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:filter</span>][<span class="ruby-value str">"identity"</span>] <span class="ruby-operator"><<</span> <span class="ruby-identifier">a</span>
108: <span class="ruby-keyword kw">end</span>
-109: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000454" class="method-detail">
- <a name="M000454"></a>
-
- <div class="method-heading">
- <a href="#M000454" class="method-signature">
- <span class="method-name">add_required_options</span><span class="method-args">()</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
+109: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <div id="add-required-options-method" class="method-detail ">
+ <a name="M000028"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">add_required_options</span><span
+ class="method-args">()</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
These options should always be present
</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000454-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000454-source">
+
+
+
+ <div class="method-source-code"
+ id="add-required-options-source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/optionparser.rb, line 112</span>
112: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_required_options</span>
122: <span class="ruby-identifier">puts</span> <span class="ruby-ivar">@parser</span>
123: <span class="ruby-identifier">exit!</span> <span class="ruby-value">1</span>
124: <span class="ruby-keyword kw">end</span>
-125: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
-
- <div id="method-M000452" class="method-detail">
- <a name="M000452"></a>
-
- <div class="method-heading">
- <a href="#M000452" class="method-signature">
- <span class="method-name">parse</span><span class="method-args">() {|@parser, @options| ...}</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
+125: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ <div id="parse-method" class="method-detail ">
+ <a name="M000021"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">parse</span><span
+ class="method-args">(&block)</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
Parse the options returning the options, you can pass a block that adds
additional options to the <a href="Optionparser.html">Optionparser</a>.
</p>
Users can set default options that get parsed in using the
MCOLLECTIVE_EXTRA_OPTS environemnt variable
</p>
- <p><a class="source-toggle" href="#"
- onclick="toggleCode('M000452-source');return false;">[Source]</a></p>
- <div class="method-source-code" id="M000452-source">
+
+
+
+ <div class="method-source-code"
+ id="parse-source">
<pre>
<span class="ruby-comment cmt"># File lib/mcollective/optionparser.rb, line 48</span>
48: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
66: <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:collective</span>] = <span class="ruby-constant">Config</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">main_collective</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">:collective</span>]
67:
68: <span class="ruby-ivar">@options</span>
-69: <span class="ruby-keyword kw">end</span>
-</pre>
- </div>
- </div>
- </div>
+69: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+ <div id="private-instance-method-details" class="method-section section">
+ <h3 class="section-header">Private Instance Methods</h3>
+
+
+ <div id="parse-fact-method" class="method-detail ">
+ <a name="M000032"></a>
+
+ <div class="method-heading">
+
+ <span class="method-name">parse_fact</span><span
+ class="method-args">(fact)</span>
+ <span class="method-click-advice">click to toggle source</span>
+
+ </div>
+
+ <div class="method-description">
+
+ <p>
+Parse a fact filter string like foo=bar into the tuple hash thats needed
+</p>
+
+
+ <div class="method-source-code"
+ id="parse-fact-source">
+<pre>
+ <span class="ruby-comment cmt"># File lib/mcollective/optionparser.rb, line 184</span>
+184: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_fact</span>(<span class="ruby-identifier">fact</span>)
+185: <span class="ruby-constant">Util</span>.<span class="ruby-identifier">parse_fact_string</span>(<span class="ruby-identifier">fact</span>)
+186: <span class="ruby-keyword kw">end</span></pre>
+ </div>
+
+ </div>
- </div>
+
+ </div>
+
+ </div>
+
- </div>
+ </div>
-<div id="validator-badges">
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
-</div>
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
+
+ <p>Disabled; run with --debug to generate this.</p>
+
+ </div>
+
+ <div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
+ Rdoc Generator</a> 1.1.6</small>.</p>
+ </div>
</body>
-</html>
\ No newline at end of file
+</html>
+