Class: Moku::LoggedReleases

Inherits:
Object
  • Object
show all
Defined in:
lib/moku/logged_releases.rb

Overview

This class is specifcally for outputting a collection of LoggedRelease, which it knows too much about. Its primary purpose right now is to remove the need to test the functionality in Releases

Instance Method Summary collapse

Constructor Details

#initialize(releases) ⇒ LoggedReleases

Returns a new instance of LoggedReleases.


11
12
13
# File 'lib/moku/logged_releases.rb', line 11

def initialize(releases)
  @releases = releases
end

Instance Method Details

#to_sObject


15
16
17
18
19
20
21
22
23
24
25
# File 'lib/moku/logged_releases.rb', line 15

def to_s
  Terminal::Table.new do |t|
    t.headings = headings
    t.rows = rows
    t.style = {
      all_separators: false,
      border_bottom: false,
      border_top: false
    }
  end.to_s
end

#to_short_sObject


27
28
29
30
31
32
33
34
35
36
37
# File 'lib/moku/logged_releases.rb', line 27

def to_short_s
  Terminal::Table.new do |t|
    t.headings = headings
    t.rows = short_rows
    t.style = {
      all_separators: false,
      border_bottom: false,
      border_top: false
    }
  end.to_s
end