Class: StatusPageRuby::Services::BuildHistoryTable
- Inherits:
-
Object
- Object
- StatusPageRuby::Services::BuildHistoryTable
- Defined in:
- lib/status_page_ruby/services/build_history_table.rb
Constant Summary collapse
- HEADINGS =
%w[Service Status Time].freeze
Instance Attribute Summary collapse
-
#status_repository ⇒ Object
readonly
Returns the value of attribute status_repository.
Instance Method Summary collapse
- #call(service = nil) ⇒ Object
-
#initialize(status_repository) ⇒ BuildHistoryTable
constructor
A new instance of BuildHistoryTable.
Constructor Details
#initialize(status_repository) ⇒ BuildHistoryTable
Returns a new instance of BuildHistoryTable.
8 9 10 |
# File 'lib/status_page_ruby/services/build_history_table.rb', line 8 def initialize(status_repository) @status_repository = status_repository end |
Instance Attribute Details
#status_repository ⇒ Object (readonly)
Returns the value of attribute status_repository.
6 7 8 |
# File 'lib/status_page_ruby/services/build_history_table.rb', line 6 def status_repository @status_repository end |
Instance Method Details
#call(service = nil) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/status_page_ruby/services/build_history_table.rb', line 12 def call(service = nil) Terminal::Table.new( headings: HEADINGS, rows: build_rows(service) ).to_s end |