Class: Scatter::Commands::List
- Inherits:
-
Scatter::Command
- Object
- Scatter::Command
- Scatter::Commands::List
- Defined in:
- lib/scatter/commands/list.rb
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize(out, node_name) ⇒ List
constructor
A new instance of List.
- #node ⇒ Object
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 |
#node ⇒ Object
22 23 24 |
# File 'lib/scatter/commands/list.rb', line 22 def node @node ||= Scatter::Config.find_node(@node_name) end |