Sha256: da246b2ac73ecee96b50a4ac671b7324bf822e0e73fdbe651abde4be400c7c55

Contents?: true

Size: 295 Bytes

Versions: 5

Compression:

Stored size: 295 Bytes

Contents

module GitDiff
  class Parser
    attr_reader :string, :diff

    def initialize(string)
      @string = string
      @diff = Diff.new
    end

    def parse
      lines.each do |line|
        diff << line
      end
    end

    private

    def lines
      string.split("\n")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
git_diff-0.4.2 lib/git_diff/parser.rb
git_diff-0.4.1 lib/git_diff/parser.rb
git_diff-0.4.0 lib/git_diff/parser.rb
git_diff-0.3.1 lib/git_diff/parser.rb
git_diff-0.3.0 lib/git_diff/parser.rb