Class: Umwelt::Command::Clone

Inherits:
Base show all
Defined in:
lib/umwelt/command/clone.rb

Instance Method Summary collapse

Methods inherited from Abstract::Interactor

#prove

Constructor Details

#initialize(path: '.umwelt') ⇒ Clone

Returns a new instance of Clone.



7
8
9
10
# File 'lib/umwelt/command/clone.rb', line 7

def initialize(path: '.umwelt')
  @path = path
  @written_paths = {}
end

Instance Method Details

#call(user_project: '/') ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/umwelt/command/clone.rb', line 12

def call(user_project: '/')
  user_name, project_name = user_project.split('/')

  project = get_project(
    project_name: project_name, user_name: user_name
  )
  store_project!(project)

  history = get_history(project.project_id)
  store_history!(history)
  get_episodes(history)
end