Sha256: 7ee32000ca23eed6123ad59e3634a0a555c7dbb7daa2f15156be0eb1c3615a8b
Contents?: true
Size: 443 Bytes
Versions: 1
Compression:
Stored size: 443 Bytes
Contents
require 'report/head/row' class Report class Head attr_reader :table def initialize(table, &blk) @table = table @rows = [] instance_eval(&blk) end def row(*cells) @rows << Row.new(self, cells) end def each(report) @rows.each do |row| yield row.read(report) end end def to_a(report) a = [] each(report) { |row| a << row.to_a } a end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
report-0.0.1 | lib/report/head.rb |