Class: Natives::HostDetection
- Inherits:
-
Object
- Object
- Natives::HostDetection
show all
- Defined in:
- lib/natives/host_detection.rb,
lib/natives/host_detection/platform.rb,
lib/natives/host_detection/package_provider.rb
Defined Under Namespace
Classes: PackageProvider, Platform
Instance Method Summary
collapse
Constructor Details
Returns a new instance of HostDetection.
7
8
9
10
11
|
# File 'lib/natives/host_detection.rb', line 7
def initialize(opts={})
@detect_platform = opts.fetch(:detect_platform) { Platform.new }
@detect_package_provider = opts.fetch(:detect_package_provider) {
PackageProvider.new(@detect_platform) }
end
|
Instance Method Details
#package_provider ⇒ Object
21
22
23
|
# File 'lib/natives/host_detection.rb', line 21
def package_provider
@detect_package_provider.name
end
|
13
14
15
|
# File 'lib/natives/host_detection.rb', line 13
def platform
@detect_platform.name
end
|
17
18
19
|
# File 'lib/natives/host_detection.rb', line 17
def platform_version
@detect_platform.version
end
|