Class: GitImproved::GitConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/git-improved.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGitConfig

Returns a new instance of GitConfig.



38
39
40
41
42
43
44
45
46
47
# File 'lib/git-improved.rb', line 38

def initialize()
  @prompt                  = "[#{File.basename($0)}]$ "
  @default_action          = "status:here"   # or: "status:info"
  @initial_branch          = "main"   # != 'master'
  @initial_commit_message  = "Initial commit (empty)"
  @gitignore_items         = ["*~", "*.DS_Store", "tmp", "*.pyc"]
  @history_graph_format    = "%C(auto)%h %ad <%al> | %d %s"
 #@history_graph_format    = "\e[32m%h %ad\e[0m <%al> \e[2m|\e[0m\e[33m%d\e[0m %s"
  @history_graph_options   = ["--graph", "--date=short", "--decorate"]
end

Instance Attribute Details

#default_actionObject

Returns the value of attribute default_action.



50
51
52
# File 'lib/git-improved.rb', line 50

def default_action
  @default_action
end

#gitignore_itemsObject

Returns the value of attribute gitignore_items.



53
54
55
# File 'lib/git-improved.rb', line 53

def gitignore_items
  @gitignore_items
end

#history_graph_formatObject

Returns the value of attribute history_graph_format.



54
55
56
# File 'lib/git-improved.rb', line 54

def history_graph_format
  @history_graph_format
end

#history_graph_optionsObject

attr_accessor :history_graph_format



56
57
58
# File 'lib/git-improved.rb', line 56

def history_graph_options
  @history_graph_options
end

#initial_branchObject

Returns the value of attribute initial_branch.



51
52
53
# File 'lib/git-improved.rb', line 51

def initial_branch
  @initial_branch
end

#initial_commit_messageObject

Returns the value of attribute initial_commit_message.



52
53
54
# File 'lib/git-improved.rb', line 52

def initial_commit_message
  @initial_commit_message
end

#promptObject

Returns the value of attribute prompt.



49
50
51
# File 'lib/git-improved.rb', line 49

def prompt
  @prompt
end