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.2.2 lib/qiita_org/old_programs/check_pc_os.rb
qiita_org-0.2.1 lib/qiita_org/old_programs/check_pc_os.rb
qiita_org-0.1.41 lib/qiita_org/old_programs/check_pc_os.rb
qiita_org-0.1.40 lib/qiita_org/old_programs/check_pc_os.rb
qiita_org-0.1.39 lib/qiita_org/old_programs/check_pc_os.rb
qiita_org-0.1.38 lib/qiita_org/old_programs/check_pc_os.rb
qiita_org-0.1.37 lib/qiita_org/old_programs/check_pc_os.rb
qiita_org-0.1.35 lib/qiita_org/old_programs/check_pc_os.rb
qiita_org-0.1.34 lib/qiita_org/old_programs/check_pc_os.rb
qiita_org-0.1.33 lib/qiita_org/old_programs/check_pc_os.rb
qiita_org-0.1.32 lib/qiita_org/old_programs/check_pc_os.rb
qiita_org-0.1.31 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.30 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.29 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.28 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.27 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.26 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.25 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.24 lib/qiita_org/check_pc_os.rb
qiita_org-0.1.23 lib/qiita_org/check_pc_os.rb