class RailsNew::Command

Attributes

command[RW]

Public Class Methods

new(*command) click to toggle source
# File lib/rails_new/command.rb, line 5
def initialize(*command)
  self.command = command
end

Public Instance Methods

run() click to toggle source
# File lib/rails_new/command.rb, line 9
def run
  result = Kernel.system *command
  unless result
    raise "Command #{to_s} failed."
  end
end
to_s() click to toggle source
# File lib/rails_new/command.rb, line 16
def to_s
  command.join(' ')
end