Skip to content

Commit

Permalink
Comment changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Oct 16, 2009
1 parent 6c45180 commit 36f4fef
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions lib/terminal-table/table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,27 @@ class Error < StandardError; end

X, Y, I = '-', '|', '+'

attr_accessor :headings, :rows
##
# Headings array.

attr_accessor :headings

##
# Rows array.

attr_accessor :rows

##
# Generates a ASCII table.
# Generates a ASCII table with the given _options_.

def initialize options = {}, &block
@headings = options.fetch :headings, []
@rows = options.fetch :rows, []
yield_or_eval &block if block_given?
yield_or_eval &block if block
end

##
# Render the table. Often you will simply call _puts_ with an
# instance in order to output it to the terminal.
# Render the table.

def render
buffer = seperator << "\n"
Expand Down

0 comments on commit 36f4fef

Please sign in to comment.