Class: Sem::Views::Projects
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.info(org) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/sem/views/projects.rb', line 13 def self.info(org) print_table [ ["ID", org[:id]], ["Name", org[:name]], ["Created", org[:created_at]], ["Updated", org[:updated_at]] ] end |
.list(projects) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/sem/views/projects.rb', line 3 def self.list(projects) header = ["ID", "NAME"] body = projects.map do |project| [project[:id], project[:name]] end print_table([header, *body]) end |