Class: Butcher::Stab::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/butcher/stab/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#node_matcherObject

Returns the value of attribute node_matcher.



2
3
4
# File 'lib/butcher/stab/cli.rb', line 2

def node_matcher
  @node_matcher
end

#optionsObject

Returns the value of attribute options.



3
4
5
# File 'lib/butcher/stab/cli.rb', line 3

def options
  @options
end

Instance Method Details

#run(arguments, options = {}) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/butcher/stab/cli.rb', line 5

def run(arguments, options = {})
  self.options = options
  self.node_matcher = Array(arguments).first
  return "" if node_matcher.nil?

  ssh_to(matching_node)
end