Sha256: 2eee2b87db58286d0acd9fef14f1a6201332efaf41fe5a5c5650ede19a62c0f0
Contents?: true
Size: 570 Bytes
Versions: 9
Compression:
Stored size: 570 Bytes
Contents
require 'win32/registry' module Logirel::VS class Environment attr_reader :owner attr_reader :organization def initialize @owner = registry_get 'SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'RegisteredOwner' || 'OWNER' @organization = registry_get 'SOFTWARE\Microsoft\Windows NT\CurrentVersion', 'RegisteredOrganization' || 'ORGANIZATION' end private def registry_get(path, key) Win32::Registry::HKEY_LOCAL_MACHINE.open(path) do |reg| reg_typ, reg_val = reg.read(key) reg_val end end end end
Version data entries
9 entries across 9 versions & 1 rubygems