Class: Neetob::CLI::Local::Ls
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#apps ⇒ Object
Returns the value of attribute apps.
-
#dir ⇒ Object
Returns the value of attribute dir.
-
#sandbox ⇒ Object
Returns the value of attribute sandbox.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(apps, dir, sandbox = false) ⇒ Ls
constructor
A new instance of Ls.
- #run ⇒ Object
Methods included from Utils
#camel_case_to_slug, #is_upper?, #symbolize_keys
Constructor Details
#initialize(apps, dir, sandbox = false) ⇒ Ls
Returns a new instance of Ls.
11 12 13 14 15 16 |
# File 'lib/neetob/cli/local/ls.rb', line 11 def initialize(apps, dir, sandbox = false) super() @apps = apps @dir = dir @sandbox = sandbox end |
Instance Attribute Details
#apps ⇒ Object
Returns the value of attribute apps.
9 10 11 |
# File 'lib/neetob/cli/local/ls.rb', line 9 def apps @apps end |
#dir ⇒ Object
Returns the value of attribute dir.
9 10 11 |
# File 'lib/neetob/cli/local/ls.rb', line 9 def dir @dir end |
#sandbox ⇒ Object
Returns the value of attribute sandbox.
9 10 11 |
# File 'lib/neetob/cli/local/ls.rb', line 9 def sandbox @sandbox end |
Instance Method Details
#run ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/neetob/cli/local/ls.rb', line 18 def run matching_apps = find_all_matching_apps_or_repos(apps, :github, sandbox, true) matching_apps.each do |app| app_name = app.split("/")[1] ui.info("\nListing files from #{app_name}/#{dir}\n") ui.info(`cd ./#{app_name} && ls #{dir}`) end end |