Class: Wandbox::CLI::CompilerList

Inherits:
Thor::Group
  • Object
show all
Defined in:
lib/wandbox/cli/compiler_list.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/wandbox/cli/compiler_list.rb', line 10

def execute
	list = Wandbox.list
	if options[:lang]
		list = list.select_by_language options[:lang]
	end
	if list.empty?
		return puts "Not found compiler list."
	end
	puts "Compiler list:"
	list.each {|it|
		puts "  #{it["name"]}"
	}
end