Class: Zooline::Output
- Inherits:
-
Object
- Object
- Zooline::Output
- Defined in:
- lib/zooline/output.rb
Class Method Summary collapse
Class Method Details
.displayItem(item) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/zooline/output.rb', line 11 def self.displayItem(item) t = %{-------------------------------------------------------------------------------- Uid: #{item.uid} | added: #{item.added} Title: #{item.title} URL: #{item.url} ------------------------------------------------------------------------------- } displayMessage t end |
.displayList(list) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/zooline/output.rb', line 3 def self.displayList(list) t = table( ['Uid', 'Added', 'Title', 'Url'] ) list.each do |bk| t << [bk.uid, Time.at(bk.added.to_i).strftime('%d/%m/%Y'), bk.title.slice(0,19), bk.url.slice(0,19)] end displayMessage t end |
.displayMessage(message) ⇒ Object
23 24 25 |
# File 'lib/zooline/output.rb', line 23 def self.displayMessage() puts end |