Module: Rerun::System

Included in:
Notification, Options, Runner
Defined in:
lib/rerun/system.rb

Instance Method Summary collapse

Instance Method Details

#linux?Boolean

Returns:

  • (Boolean)

12
13
14
# File 'lib/rerun/system.rb', line 12

def linux?
   RUBY_PLATFORM =~ /linux/i
end

#mac?Boolean

Returns:

  • (Boolean)

4
5
6
# File 'lib/rerun/system.rb', line 4

def mac?
  RUBY_PLATFORM =~ /darwin/i
end

#rails?Boolean

Returns:

  • (Boolean)

16
17
18
19
# File 'lib/rerun/system.rb', line 16

def rails?
  rails_sig_file = File.expand_path(".")+"/config/boot.rb"
  File.exists? rails_sig_file
end

#windows?Boolean

Returns:

  • (Boolean)

8
9
10
# File 'lib/rerun/system.rb', line 8

def windows?
   RUBY_PLATFORM =~ /(mswin|mingw32)/i
end