Sha256: dddd8545f7daa46115483dcac0e385ee5603191dcd4553811bee3ab8551d3fe4

Contents?: true

Size: 614 Bytes

Versions: 6

Compression:

Stored size: 614 Bytes

Contents

# frozen_string_literal: true

# This file is part of the ruby-dbus project
# Copyright (C) 2023 Martin Vidner
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License, version 2.1 as published by the Free Software Foundation.
# See the file "COPYING" for the exact licensing terms.

require "rbconfig"

module DBus
  # Platform detection
  module Platform
    module_function

    def freebsd?
      RbConfig::CONFIG["target_os"] =~ /freebsd/
    end

    def macos?
      RbConfig::CONFIG["target_os"] =~ /darwin/
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby-dbus-0.24.0 lib/dbus/platform.rb
ruby-dbus-0.23.1 lib/dbus/platform.rb
ruby-dbus-0.23.0.beta2 lib/dbus/platform.rb
ruby-dbus-0.23.0.beta1 lib/dbus/platform.rb
ruby-dbus-0.22.1 lib/dbus/platform.rb
ruby-dbus-0.22.0 lib/dbus/platform.rb