Sha256: cdce83d2e6c7971fa306384612ce6cc3a47f7b79f6d9d9ce121e4349e5c8181c

Contents?: true

Size: 436 Bytes

Versions: 16

Compression:

Stored size: 436 Bytes

Contents

module Leandocument
  class Repository
    attr_accessor :base_path, :repo
    
    def initialize(options = {})
      self.base_path = options[:base_path] || Dir.pwd
      self.repo      = Grit::Repo.new(self.base_path)
    end
    
    def commits(id = nil)
      id.nil?? self.repo.commits : self.repo.commits(id)
    end

    def branches(id = nil)
      id.nil?? self.repo.branches : self.repo.branches(id).first
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
leandocument-0.1.5 lib/leandocument/repository.rb
leandocument-0.1.4 lib/leandocument/repository.rb
leandocument-0.1.3 lib/leandocument/repository.rb
leandocument-0.1.2 lib/leandocument/repository.rb
leandocument-0.1.0 lib/leandocument/repository.rb
leandocument-0.0.11 lib/leandocument/repository.rb
leandocument-0.0.10 lib/leandocument/repository.rb
leandocument-0.0.9 lib/leandocument/repository.rb
leandocument-0.0.8 lib/leandocument/repository.rb
leandocument-0.0.7 lib/leandocument/repository.rb
leandocument-0.0.6 lib/leandocument/repository.rb
leandocument-0.0.5 lib/leandocument/repository.rb
leandocument-0.0.4 lib/leandocument/repository.rb
leandocument-0.0.3 lib/leandocument/repository.rb
leandocument-0.0.2 lib/leandocument/repository.rb
leandocument-0.0.1 lib/leandocument/repository.rb