Class: Dutiful::Command::List

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/dutiful/commands/list.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/dutiful/commands/list.rb', line 4

def execute
  puts "Storage: #{Dutiful::Config.storage.name}\n\n"

  Dutiful::Application.each do |application|
    puts "#{application.name}:\n" if application.should_sync? || verbose?

    application.files.map do |file|
      puts "  #{file}" if (file.should_sync?) || verbose?
    end.compact.join("\n")
  end
end