Module: Rori18n::Platform
- Defined in:
- lib/rori18n/platform.rb
Constant Summary collapse
- SUPPORTED =
{ ["darwin", "arm64"] => "rori18n_darwin_arm64", ["darwin", "x86_64"] => "rori18n_darwin_amd64", ["linux", "x86_64"] => "rori18n_linux_amd64", }.freeze
Class Method Summary collapse
Class Method Details
.asset_name ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/rori18n/platform.rb', line 11 def self.asset_name os = normalize_os(RbConfig::CONFIG["host_os"]) cpu = RbConfig::CONFIG["host_cpu"] SUPPORTED.fetch([os, cpu]) do raise Rori18n::Error, "Unsupported platform: #{os}-#{cpu}. " \ "Supported: #{SUPPORTED.keys.map { |k| k.join('-') }.join(', ')}" end end |