Class: Codeowners::Config
- Inherits:
-
Object
- Object
- Codeowners::Config
- Defined in:
- lib/codeowners/config.rb
Overview
Connfigure and manage the git config file.
Instance Method Summary collapse
- #default_owner ⇒ Object
- #default_owner=(name) ⇒ Object
-
#initialize(git = AnonymousGit.new) ⇒ Config
constructor
A new instance of Config.
- #to_h ⇒ Object
Constructor Details
#initialize(git = AnonymousGit.new) ⇒ Config
Returns a new instance of Config.
30 31 32 |
# File 'lib/codeowners/config.rb', line 30 def initialize(git = AnonymousGit.new) @git = git end |
Instance Method Details
#default_owner ⇒ Object
34 35 36 |
# File 'lib/codeowners/config.rb', line 34 def default_owner @git.config('user.owner') end |
#default_owner=(name) ⇒ Object
38 39 40 |
# File 'lib/codeowners/config.rb', line 38 def default_owner=(name) @git.config('user.owner', name) end |
#to_h ⇒ Object
42 43 44 45 46 |
# File 'lib/codeowners/config.rb', line 42 def to_h { default_owner: default_owner } end |