Class: PolySSH::Cli
- Inherits:
-
Object
- Object
- PolySSH::Cli
- Defined in:
- lib/polyssh/cli.rb
Instance Attribute Summary collapse
-
#chain ⇒ Object
readonly
Returns the value of attribute chain.
Class Method Summary collapse
Instance Method Summary collapse
- #build_commands(chain) ⇒ Object
-
#initialize ⇒ Cli
constructor
A new instance of Cli.
- #parse_cmdline(args) ⇒ Object
Constructor Details
#initialize ⇒ Cli
Returns a new instance of Cli.
20 21 22 23 |
# File 'lib/polyssh/cli.rb', line 20 def initialize @chain = NodeList.new = {} end |
Instance Attribute Details
#chain ⇒ Object (readonly)
Returns the value of attribute chain.
8 9 10 |
# File 'lib/polyssh/cli.rb', line 8 def chain @chain end |
Class Method Details
.start(args) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/polyssh/cli.rb', line 10 def self.start args app = self.new app.parse_cmdline args app.build_commands app.chain #app.run commands end |
Instance Method Details
#build_commands(chain) ⇒ Object
32 33 34 35 |
# File 'lib/polyssh/cli.rb', line 32 def build_commands chain commands = chain.accept(CommandBuilder.new) return commands end |
#parse_cmdline(args) ⇒ Object
25 26 27 28 29 |
# File 'lib/polyssh/cli.rb', line 25 def parse_cmdline args args _parse_cmdline_hops args end |