Sha256: 8730a4d4f01b62c4fa6b92d7cf2e1a228028dca01ce7491c287ce7c2beba0397

Contents?: true

Size: 482 Bytes

Versions: 9

Compression:

Stored size: 482 Bytes

Contents

require 'ohai'

module Natives
  class HostDetection
    class Platform

      def initialize
        @ohai = build_ohai
      end

      def name
        ohai_hash[:platform]
      end

      def version
        ohai_hash[:platform_version]
      end

      def ohai_hash
        @ohai
      end

      protected

      def build_ohai
        ohai = Ohai::System.new
        ohai.require_plugin 'os'
        ohai.require_plugin 'platform'
        ohai
      end

    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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