Sha256: 34accfa8c84c96372759447b9bcdb50a94e9643910e21155caa04ad0514908c9

Contents?: true

Size: 385 Bytes

Versions: 3

Compression:

Stored size: 385 Bytes

Contents

module Mercurial
  
  module Helper
    
    def hg(cmd)
      repository.shell.hg(cmd)
    end
    
    def shell(cmd)
      repository.shell.run(cmd)
    end
    
    def hg_to_array(cmd, separator="\n", &block)
      [].tap do |returning|
        hg(cmd).split(separator).each do |line|
          returning << block.call(line)
        end
      end.compact
    end
    
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mercurial-ruby-0.5.0 lib/mercurial-ruby/helper.rb
mercurial-ruby-0.4.0 lib/mercurial-ruby/helper.rb
mercurial-ruby-0.3.0 lib/mercurial-ruby/helper.rb