Class: Natives::Cli
- Inherits:
-
Thor
- Object
- Thor
- Natives::Cli
- Defined in:
- lib/natives/cli.rb
Instance Method Summary collapse
Instance Method Details
#detect ⇒ Object
30 31 32 33 |
# File 'lib/natives/cli.rb', line 30 def detect app = Apps::Detect.new puts app.detection_info end |
#list(*entry_names) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/natives/cli.rb', line 13 def list(*entry_names) app = Apps::List.new catalog_name = [:catalog] if catalog_name == 'rubygems' && entry_names.empty? packages = app.natives_for_gemfile([:gemfile]) else packages = app.natives_for(catalog_name, entry_names) end puts packages rescue => ex $stderr.puts ex. end |
#version ⇒ Object
37 38 39 40 41 42 |
# File 'lib/natives/cli.rb', line 37 def version version_file = File.(File.join( File.dirname(__FILE__), '..', '..', 'VERSION')) puts IO.read(version_file) end |