Sha256: 49833c110b672c728d9c65a0aa608aff3d53c0d3f972daa9d18a89c1f0e0c10f

Contents?: true

Size: 299 Bytes

Versions: 33

Compression:

Stored size: 299 Bytes

Contents

class CheckPcOs
  def initialize()
    @macos = system "sw_vers"
    @winos = system "wmic.exe os get caption"
  end

  def return_os()
    if @macos
      return os = "mac"
    elsif @winos
      return os = "windows"
    else
      return nil
    end
  end
end

#p os = CheckPcOs.new.return_os()

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
qiita_org-0.1.22 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.21 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.20 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.19 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.18 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.17 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.16 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.15 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.14 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.13 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.12 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.11 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.10 lib/qiita_org/check_pc_os.rb