Module: OpenStudio::Workflow::Util::IO
- Included in:
- EnergyPlus
- Defined in:
- lib/openstudio/workflow/util/io.rb
Instance Method Summary collapse
Instance Method Details
#is_windows? ⇒ Boolean
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/openstudio/workflow/util/io.rb', line 42 def is_windows? win_patterns = [ /bccwin/i, /cygwin/i, /djgpp/i, /mingw/i, /mswin/i, /wince/i ] case RUBY_PLATFORM when *win_patterns return true else return false end end |
#popen_command(command) ⇒ Object
60 61 62 63 64 65 66 |
# File 'lib/openstudio/workflow/util/io.rb', line 60 def popen_command(command) result = command if is_windows? result = command.tr('/', '\\') end return result end |