Class: Testjour::CLI::List
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Testjour::CLI::List
- Includes:
- Bonjour
- Defined in:
- lib/testjour/commands/list.rb
Instance Attribute Summary
Attributes inherited from BaseCommand
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(*args) ⇒ List
constructor
A new instance of List.
- #run ⇒ Object
Methods included from Bonjour
#bonjour_serve, #bonjour_servers, #found_bonjour_server
Methods inherited from BaseCommand
detailed_help, help, inherited, #option_parser, options
Constructor Details
#initialize(*args) ⇒ List
Returns a new instance of List.
15 16 17 18 19 20 21 |
# File 'lib/testjour/commands/list.rb', line 15 def initialize(*args) super Testjour.load_cucumber require "testjour/colorer" rescue LoadError # No cucumber, we can't use color :( end |
Class Method Details
.command ⇒ Object
11 12 13 |
# File 'lib/testjour/commands/list.rb', line 11 def self.command "list" end |
Instance Method Details
#run ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/testjour/commands/list.rb', line 23 def run if bonjour_servers.any? puts puts "Testjour servers:" puts bonjour_servers.each do |server| puts server.status_line end else puts puts "No testjour servers found." end end |