Class: Scatter::Commands::List

Inherits:
Scatter::Command show all
Defined in:
lib/scatter/commands/list.rb

Instance Method Summary collapse

Methods inherited from Scatter::Command

command_name, help, inherited, usage

Constructor Details

#initialize(out, node_name) ⇒ List

Returns a new instance of List.



12
13
14
15
# File 'lib/scatter/commands/list.rb', line 12

def initialize(out, node_name)
  super(out)
  @node_name = node_name
end

Instance Method Details

#execute!Object



17
18
19
20
# File 'lib/scatter/commands/list.rb', line 17

def execute!
  gemlist = node.list
  @out.puts gemlist.gem_output
end

#nodeObject



22
23
24
# File 'lib/scatter/commands/list.rb', line 22

def node
  @node ||= Scatter::Config.find_node(@node_name)
end