Class: CollinsShell::Tag
- Inherits:
-
Thor
- Object
- Thor
- CollinsShell::Tag
- Includes:
- ThorHelper, Util
- Defined in:
- lib/collins_shell/tag.rb
Constant Summary
Constants included from Util
Constants included from ThorHelper
CollinsShell::ThorHelper::COLLINS_OPTIONS, CollinsShell::ThorHelper::PAGE_OPTIONS
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Util
#asset_exec, #asset_get, #call_collins, #finalize_exec, #format_asset_tags, #format_asset_value, #get_selector, #is_array?, #print_find_results, #run_command_in_thread, #say_status, #thread_mgr
Methods included from ThorHelper
#appropriate_answer?, #batch_selector_operation, #collins_config_from_file, #ensure_password, #get_collins_client, #get_collins_config, #get_password, included, #require_valid_collins_config, #require_yes, #say_error, #say_success, #selector_or_tag, #try_config_merge, #use_collins_options, #use_nuke_option, #use_page_options, #use_selector_option, #use_tag_option
Class Method Details
.banner(task, namespace = true, subcommand = false) ⇒ Object
14 15 16 |
# File 'lib/collins_shell/tag.rb', line 14 def self. task, namespace = true, subcommand = false "#{basename} #{task.formatted_usage(self, true, subcommand).gsub(':',' ')}" end |
Instance Method Details
#list ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/collins_shell/tag.rb', line 20 def list call_collins get_collins_client, "list" do |client| header = [["Name", "Label", "Description"]] = header + client..map do |tag| [tag.name, tag.label, tag.description] end print_table end end |
#values(tag) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/collins_shell/tag.rb', line 32 def values tag call_collins get_collins_client, "values" do |client| client.get_tag_values(tag).sort.each do |value| puts(value) end end end |