Class: Bickle::ThorBuildsTable
- Inherits:
-
Object
- Object
- Bickle::ThorBuildsTable
- Defined in:
- lib/bickle/thor_builds_table.rb
Instance Method Summary collapse
-
#initialize(headers, builds, shell) ⇒ ThorBuildsTable
constructor
A new instance of ThorBuildsTable.
- #render ⇒ Object
Constructor Details
#initialize(headers, builds, shell) ⇒ ThorBuildsTable
Returns a new instance of ThorBuildsTable.
3 4 5 6 7 |
# File 'lib/bickle/thor_builds_table.rb', line 3 def initialize(headers, builds, shell) @headers = headers @builds = builds @shell = shell end |
Instance Method Details
#render ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/bickle/thor_builds_table.rb', line 9 def render rows = @builds.map do |build| @headers.map do |header| build.send header end end @shell.print_table(rows) end |