Sha256: c246f65a307f27fa84a7522c983bfdbb9dee46895f74a138baea4139335a9421
Contents?: true
Size: 649 Bytes
Versions: 11
Compression:
Stored size: 649 Bytes
Contents
# Helper methods here and in the required files can be used by Origen during the bootup process. # (e.g., in site config ERB files) # This can be expanded as needed to provide more helpers. module Origen # NOTE: Gems are not allowed to be required here, only Ruby stlibs require 'socket' require_relative '../operating_systems' # Platform independent means of retrieving the hostname def self.hostname # gethostbyname is deprecated in favor of Addrinfo#getaddrinfo # rubocop:disable Lint/DeprecatedClassMethods Socket.gethostbyname(Socket.gethostname).first.downcase # rubocop:enable Lint/DeprecatedClassMethods end end
Version data entries
11 entries across 11 versions & 1 rubygems