Module: ShipProjectList

Included in:
Takeltau::ShipProject
Defined in:
lib/takeltau/ship/project/list.rb

Overview

tau ship project list

Instance Method Summary collapse

Instance Method Details

#ship_project_listObject

List takelship projects



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/takeltau/ship/project/list.rb', line 6

def ship_project_list
  log.debug 'List takelship projects'
  takelship = _ship_info_lib_get_takelshipinfo
  unless takelship.instance_of?(Hash)
    say 'Could not get takelship info'
    say 'Try: ship update'
    say 'Try: ship list --debug'
    return false
  end

  unless takelship.key?('projects')
    say 'Could not get takelship projects'
    say 'Try: ship update'
    say 'Try: ship list --debug'
    return false
  end

  takelship['projects'].each do |project|
    say project['name']
  end
end