Class | Nautilus::Shell
In: | lib/nautilus/shell.rb
Parent: | Object

### Methods

build_command run sh windows?

### Public Instance methods

build_command(command, options = {})

[Source]

        # File lib/nautilus/shell.rb, line 9
     9:     def build_command(command, options = {})
    10:       actual_command = command.kind_of?(Array) ? command.join(" ") : command
    11:       if options[:background]
    12:         if windows?
    13:           actual_command = "start /wait /b " + command
    14:         elsif options[:background]
    15:           actual_command << " &"
    16:         end
    17:       end
    18:       actual_command
    19:     end

run(command, options = {})

[Source]

       # File lib/nautilus/shell.rb, line 5
    5:     def run(command, options = {})
    6:       sh build_command(command, options)
    7:     end

sh(command)

[Source]

        # File lib/nautilus/shell.rb, line 25
    25:     def sh(command)
    26:       successful = system(command)
    27:       raise "Error while running >>#{command}<<" unless successful
    28:     end

windows?()

[Source]

        # File lib/nautilus/shell.rb, line 21
    21:     def windows?
    22:       PLATFORM['win32']
    23:     end

[Validate]