Class: Natives::HostDetection::Platform

Inherits:
Object
  • Object
show all
Defined in:
lib/natives/host_detection/platform.rb

Instance Method Summary collapse

Constructor Details

#initializePlatform

Returns a new instance of Platform.



7
8
9
# File 'lib/natives/host_detection/platform.rb', line 7

def initialize
  @ohai = build_ohai
end

Instance Method Details

#nameObject



11
12
13
# File 'lib/natives/host_detection/platform.rb', line 11

def name
  ohai_hash[:platform]
end

#ohai_hashObject



19
20
21
# File 'lib/natives/host_detection/platform.rb', line 19

def ohai_hash
  @ohai
end

#versionObject



15
16
17
# File 'lib/natives/host_detection/platform.rb', line 15

def version
  ohai_hash[:platform_version]
end