gabynaiman/git_wrapper

View on GitHub
lib/git_wrapper/results/log_info.rb

Summary

Maintainability
A
0 mins
Test Coverage
module GitWrapper
  module Results
    class LogInfo

      def initialize(attributes)
        @attributes = attributes
      end

      Commands::Log::ATTRIBUTES.keys.each do |name|
        define_method name do
          @attributes[name]
        end
      end

      def parents
        parent_hashes.split
      end

      def abbreviated_parents
        abbreviated_parent_hashes.split
      end

      def merge?
        parents.length == 2
      end
    end
  end
end