Sha256: a4e18b83a3cb8045f1ea7649e0811c8afb4721a8f9fd3a6390b9977382a576af
Contents?: true
Size: 817 Bytes
Versions: 5
Compression:
Stored size: 817 Bytes
Contents
# frozen_string_literal: true require "singleton" require_relative "./rubystats_psm/version" class RubyStatsPsm include Singleton text = "OS is not supported in this version." if OS.include? "linux" require "usagewatch/linux" require_relative "./rubystats_psm/linux" require_relative "./rubystats_psm/skcript_linux" elsif OS.match?(/cygwin|mswin|mingw|bccwin|wince|emx/) puts "Windows" + text elsif Os.include? "darwin" puts "Darwin" + text else puts "This" + text end private def method_missing(symbol, *args) if Usagewatch.respond_to?(symbol) Usagewatch.send(symbol, *args) end super end def execute_command(cmd) `#{cmd}` end class << self private def method_missing(symbol, *args) instance.send(symbol, *args) end end end
Version data entries
5 entries across 5 versions & 1 rubygems