Class: Natives::Apps::List
- Inherits:
-
Object
- Object
- Natives::Apps::List
- Defined in:
- lib/natives/apps/list.rb
Instance Method Summary collapse
- #natives_for(catalog_name, entry_names) ⇒ Object
- #natives_for_gemfile(gemfile_path) ⇒ Object
- #new_catalog(catalog_name, platform, platform_version, package_provider) ⇒ Object
- #new_gemfile_viewer(gemfile_path) ⇒ Object
- #new_host_detection ⇒ Object
Instance Method Details
#natives_for(catalog_name, entry_names) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/natives/apps/list.rb', line 9 def natives_for(catalog_name, entry_names) host = new_host_detection catalog = new_catalog(catalog_name, host.platform, host.platform_version, host.package_provider) catalog.native_packages_for(entry_names) end |
#natives_for_gemfile(gemfile_path) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/natives/apps/list.rb', line 17 def natives_for_gemfile(gemfile_path) host = new_host_detection gem_names = new_gemfile_viewer(gemfile_path).gem_names catalog = new_catalog('rubygems', host.platform, host.platform_version, host.package_provider) catalog.native_packages_for(gem_names) end |
#new_catalog(catalog_name, platform, platform_version, package_provider) ⇒ Object
30 31 32 |
# File 'lib/natives/apps/list.rb', line 30 def new_catalog(catalog_name, platform, platform_version, package_provider) Catalog.new(catalog_name, platform, platform_version, package_provider) end |
#new_gemfile_viewer(gemfile_path) ⇒ Object
26 27 28 |
# File 'lib/natives/apps/list.rb', line 26 def new_gemfile_viewer(gemfile_path) GemfileViewer.new(gemfile_path) end |
#new_host_detection ⇒ Object
34 35 36 |
# File 'lib/natives/apps/list.rb', line 34 def new_host_detection HostDetection.new end |