Class: Pulsar::IdentifyRepositoryType

Inherits:
Object
  • Object
show all
Includes:
Interactor
Defined in:
lib/pulsar/interactors/identify_repository_type.rb

Instance Method Summary collapse

Instance Method Details

#callObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/pulsar/interactors/identify_repository_type.rb', line 7

def call
  case context.repository_location
  when :local
    context.repository_type = :folder
  when :remote
    context.repository_type = github_repository? ? :github : :git
  end
rescue
  context.fail! error: $!.message
end