class Samovar::Output::Row

Attributes

object[R]

Public Class Methods

new(object) click to toggle source
Calls superclass method
# File lib/samovar/output/row.rb, line 9
def initialize(object)
        @object = object
        super object.to_a.collect(&:to_s)
end

Public Instance Methods

align(columns) click to toggle source
# File lib/samovar/output/row.rb, line 16
def align(columns)
        self.collect.with_index do |value, index|
                value.ljust(columns.widths[index])
        end.join('  ')
end