Parent

Methods

Clio::Layout::List

List of items.

Attributes

items[R]

Public Class Methods

new(*items) click to toggle source
# File lib/clio/layout/list.rb, line 12
def initialize(*items)
  options = Hash===items.last ? items.pop : {}

  @items  = items
  @mark   = options[:mark]
end

Public Instance Methods

to_s() click to toggle source
# File lib/clio/layout/list.rb, line 19
def to_s
  s = [""]
  n = (items.size / 10).to_i + 1
  items.each_with_index do |item, index|
    s << "%#{n}s. %s" % [index+1, item]
  end
  s << ""
  s.join("\n")
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.