Class: Hirb::Helpers::TextTable
- Inherits:
-
Table
- Object
- Table
- Hirb::Helpers::TextTable
- Defined in:
- lib/overwatch/helpers.rb
Constant Summary collapse
- CHARS =
{ :top => { :left => '', :center => '', :right => '', :horizontal => '', :vertical => { :outside => '', :inside => '' } }, :middle => { :left => '', :center => '', :right => '', :horizontal => '' }, :bottom => { :left => '', :center => '', :right => '', :horizontal => '', :vertical => { :outside => '', :inside => '' } } }
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.render(rows, options = {}) ⇒ Object
89 90 91 92 |
# File 'lib/overwatch/helpers.rb', line 89 def self.render(rows, ={}) .merge!(:headers => false, :description => false) new(rows, ).render end |
Instance Method Details
#render ⇒ Object
94 95 96 97 98 99 100 101 |
# File 'lib/overwatch/helpers.rb', line 94 def render body = [] unless @rows.length == 0 setup_field_lengths body += render_rows end body.join("\n") end |