Report abuse


			
class Commit
  def initialize
    @items
    @content
  end
  def start
    `svn st`.each do |s|
      @items , @content = s.split(' ',2)
    end
    @content.split("\n").to_a
    puts @content.class
    strip()
  end
  def strip
    s = 0
    @content.each do |c|
      unless c[/\.rb$/]
        @content.delete_at(s)
      end
      s += 1
    end
    add()
  end
  def add
    @items.zip(@content).each do |i,c|
      if i == '?'
        `svn add #{i}`
      end
    end
    puts"I added this content: #{i}."
    ci()
  end
  def ci
    puts"I am now commiting contents."
    `svn st`
    puts"I am done commiting done."
    puts"And by the way, I'm just a program, so stop anthropomorphizing me. :-)"
  end
end
puts"Commiting is now commencing."
ci = Commit.new
ci.start

svn.rb:39:in `strip': undefined method `delete_at' for "Rakefile\n":String (NoMethodError)
        from svn.rb:37:in `each'
        from svn.rb:37:in `strip'
        from svn.rb:32:in `start'
        from svn.rb:63