Sha256: 9bfce11a33b0c4fe70db807642eb8358229c4b955fda599a40d2e060845b638d

Contents?: true

Size: 557 Bytes

Versions: 9

Compression:

Stored size: 557 Bytes

Contents

require 'natives/host_detection/platform'
require 'natives/host_detection/package_provider'

module Natives
  class HostDetection

    def initialize(opts={})
      @detect_platform = opts.fetch(:detect_platform) { Platform.new }
      @detect_package_provider = opts.fetch(:detect_package_provider) {
        PackageProvider.new(@detect_platform) }
    end

    def platform
      @detect_platform.name
    end

    def platform_version
      @detect_platform.version
    end

    def package_provider
      @detect_package_provider.name
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
natives-0.6.2 lib/natives/host_detection.rb
natives-0.6.1 lib/natives/host_detection.rb
natives-0.6.0 lib/natives/host_detection.rb
natives-0.5.5 lib/natives/host_detection.rb
natives-0.5.4 lib/natives/host_detection.rb
natives-0.5.3 lib/natives/host_detection.rb
natives-0.5.2 lib/natives/host_detection.rb
natives-0.5.1 lib/natives/host_detection.rb
natives-0.5.0 lib/natives/host_detection.rb