Class: Taggata::Cli::ListCommand
- Inherits:
-
Clamp::Command
- Object
- Clamp::Command
- Taggata::Cli::ListCommand
- Defined in:
- lib/taggata/cli/list.rb
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/taggata/cli/list.rb', line 10 def execute case type when :file @db.find(Taggata::Persistent::File, {}).each { |file| puts file.path } when :directory @db.find(Taggata::Persistent::Directory, {}).each { |dir| puts dir.path } when :tag @db.find(Taggata::Persistent::Tag, {}).each { |tag| puts tag.name } end end |