Class: Memo::Cli::Command::List
- Inherits:
-
Object
- Object
- Memo::Cli::Command::List
- Defined in:
- lib/memo/cli/command/list.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options, os: Memo::OS.new) ⇒ List
constructor
A new instance of List.
Constructor Details
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/memo/cli/command/list.rb', line 14 def call namespace = @options.namespace is_all = @options.all? type = @options.dir? ? "d" : "f" dir = if is_all "" else Memo::File.new( "", @options.namespace, ).dir end @os.exec "find #{@config.root}/#{dir} -type #{type}" end |