Class: Filerary::Command
- Inherits:
-
Thor
- Object
- Thor
- Filerary::Command
- Defined in:
- lib/filerary/command.rb
Instance Method Summary collapse
- #cleanup ⇒ Object
- #collect(*files) ⇒ Object
- #destroy ⇒ Object
- #list ⇒ Object
- #remove(path) ⇒ Object
- #search(word) ⇒ Object
- #show(path) ⇒ Object
- #update ⇒ Object
- #version ⇒ Object
Instance Method Details
#cleanup ⇒ Object
42 43 44 |
# File 'lib/filerary/command.rb', line 42 def cleanup Filerary::Librarian.new.cleanup end |
#collect(*files) ⇒ Object
18 19 20 |
# File 'lib/filerary/command.rb', line 18 def collect(*files) Filerary::Librarian.new.collect(files) end |
#destroy ⇒ Object
56 57 58 |
# File 'lib/filerary/command.rb', line 56 def destroy Filerary::Librarian.new.destroy end |
#list ⇒ Object
13 14 15 |
# File 'lib/filerary/command.rb', line 13 def list puts Filerary::Librarian.new.list end |
#remove(path) ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/filerary/command.rb', line 47 def remove(path) begin Filerary::Librarian.new.remove(path) rescue ArgumentError => e STDERR.puts "#{e.class}: #{e.}: #{path}" end end |
#search(word) ⇒ Object
23 24 25 |
# File 'lib/filerary/command.rb', line 23 def search(word) puts Filerary::Librarian.new.search(word) end |
#show(path) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/filerary/command.rb', line 28 def show(path) begin puts Filerary::Librarian.new.show(path) rescue ArgumentError => e STDERR.puts "#{e.class}: #{e.}: #{path}" end end |
#update ⇒ Object
37 38 39 |
# File 'lib/filerary/command.rb', line 37 def update Filerary::Librarian.new.update end |
#version ⇒ Object
8 9 10 |
# File 'lib/filerary/command.rb', line 8 def version puts VERSION end |