Class: Coauthor::Git::Template
- Inherits:
-
Object
- Object
- Coauthor::Git::Template
- Includes:
- Constants
- Defined in:
- lib/coauthor/git/template.rb
Constant Summary
Constants included from Constants
Constants::PAIR_CONFIG_FILE, Constants::PAIR_FILE_PATH
Instance Attribute Summary collapse
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(credentials:) ⇒ Template
constructor
A new instance of Template.
Constructor Details
#initialize(credentials:) ⇒ Template
Returns a new instance of Template.
9 10 11 12 |
# File 'lib/coauthor/git/template.rb', line 9 def initialize(credentials:) @credentials = credentials write_file end |
Instance Attribute Details
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
8 9 10 |
# File 'lib/coauthor/git/template.rb', line 8 def credentials @credentials end |
Class Method Details
.call ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/coauthor/git/template.rb', line 14 def self.call credentials = Prompt.fetch_user_info(user_count: 2) return unless credentials new(credentials: credentials) rescue SystemExit, Interrupt puts "\n...Template setup cancelled".colorize(:red) end |