Class: Wikiwiki::CLI::Commands::Attachment::List
- Defined in:
- lib/wikiwiki/cli/commands/attachment/list.rb
Overview
List attachments on a page
Instance Method Summary collapse
-
#call(page_name:, out: $stdout, err: $stderr, **options) ⇒ void
Execute the list command.
Instance Method Details
#call(page_name:, out: $stdout, err: $stderr, **options) ⇒ void
This method returns an undefined value.
Execute the list command
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/wikiwiki/cli/commands/attachment/list.rb', line 20 def call(page_name:, out: $stdout, err: $stderr, **) wiki = create_wiki(out:, err:, **) = wiki.(page_name:) if [:json] out.puts Formatter::JSON.new.format() else .each {|name| out.puts name } say("#{attachment_names.size} attachments found", out:, **) end end |