class TextEditor::Configuration::OperatingSystem

Attributes

version[R]

Public Class Methods

new(version) click to toggle source
  # File lib/text_editor/configuration/operating_system.rb
6 def initialize(version)
7   @version = version
8 end

Public Instance Methods

type() click to toggle source
   # File lib/text_editor/configuration/operating_system.rb
10 def type
11   case version
12   when /cygwin/      then :Cygwin
13   when /bsd|linux/   then :Linux
14   when /darwin|mac/  then :Mac
15   when /mingw|mswin/ then :Windows
16   else :Unknown
17   end
18 end