class Treet::Gitfarm

Attributes

author[R]

Public Class Methods

new(opts) click to toggle source
Calls superclass method Treet::Farm::new
# File lib/treet/gitfarm.rb, line 6
def initialize(opts)
  raise ArgumentError, "No git farm without an author for commits" unless opts[:author]
  super
  @repotype = Treet::Gitrepo
  @author = opts[:author]
end
plant(opts) click to toggle source
Calls superclass method Treet::Farm::plant
# File lib/treet/gitfarm.rb, line 13
def self.plant(opts)
  super(opts.merge(:repotype => Treet::Gitrepo))
end

Public Instance Methods

add(hash, opts = {}) click to toggle source
Calls superclass method Treet::Farm#add
# File lib/treet/gitfarm.rb, line 25
def add(hash, opts = {})
  repo = super(hash, opts.merge(:author => author))
  if opts[:tag]
    repo.tag(opts[:tag])
  end
  repo
end
repo(id, opts = {}) click to toggle source
Calls superclass method Treet::Farm#repo
# File lib/treet/gitfarm.rb, line 21
def repo(id, opts = {})
  super(id, opts.merge(:author => author))
end
repos() click to toggle source
Calls superclass method Treet::Farm#repos
# File lib/treet/gitfarm.rb, line 17
def repos
  super(:author => author)
end