Class: GitSu::Factory
- Inherits:
-
Object
- Object
- GitSu::Factory
- Defined in:
- lib/gitsu/factory.rb
Instance Method Summary collapse
- #config_repository ⇒ Object
- #git ⇒ Object
- #gitsu ⇒ Object
-
#initialize(output, user_list_file) ⇒ Factory
constructor
A new instance of Factory.
- #runner ⇒ Object
- #switcher ⇒ Object
- #user_file ⇒ Object
- #user_list ⇒ Object
Constructor Details
#initialize(output, user_list_file) ⇒ Factory
Returns a new instance of Factory.
19 20 21 |
# File 'lib/gitsu/factory.rb', line 19 def initialize(output, user_list_file) @output, @user_list_file = output, File.(user_list_file) end |
Instance Method Details
#config_repository ⇒ Object
27 28 29 |
# File 'lib/gitsu/factory.rb', line 27 def config_repository @config_repository ||= ConfigRepository.new(git) end |
#git ⇒ Object
23 24 25 |
# File 'lib/gitsu/factory.rb', line 23 def git @git ||= CachingGit.new(Shell.new) end |
#gitsu ⇒ Object
43 44 45 |
# File 'lib/gitsu/factory.rb', line 43 def gitsu @gitsu ||= Gitsu.new(switcher, @output) end |
#switcher ⇒ Object
39 40 41 |
# File 'lib/gitsu/factory.rb', line 39 def switcher @switcher ||= Switcher.new(config_repository, git, user_list, @output) end |