class GitPunch::Repository
Attributes
path[RW]
user[RW]
Public Class Methods
current!()
click to toggle source
# File lib/git_punch/repository.rb, line 20 def self.current! new from: ENV['PWD'] end
new(options={})
click to toggle source
# File lib/git_punch/repository.rb, line 7 def initialize options={} @path = options[:from] @user = if options[:user].nil? User.from_config else create_user_from options[:user] end end
Public Instance Methods
name()
click to toggle source
# File lib/git_punch/repository.rb, line 16 def name File.basename path end
Private Instance Methods
create_user_from(param)
click to toggle source
# File lib/git_punch/repository.rb, line 25 def create_user_from param if param.is_a? String User.new name: param else param end end