Sha256: 75390b192ded7a2f73027866f22da2f785bf43b4c2d3e87e71e1d7460415b687
Contents?: true
Size: 758 Bytes
Versions: 4
Compression:
Stored size: 758 Bytes
Contents
# Column abstraction for Rhubarb. # # Copyright (c) 2009--2010 Red Hat, Inc. # # Author: William Benton (willb@redhat.com) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 module Rhubarb class Column attr_reader :name def initialize(name, kind, quals) @name, @kind = name, kind @quals = quals.map {|x| x.to_s.gsub("_", " ") if x.class == Symbol} @quals.map end def to_s qualifiers = @quals.join(" ") if qualifiers == "" "'#@name' #@kind" else "'#@name' #@kind #{qualifiers}" end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rhubarb-0.4.3 | lib/rhubarb/column.rb |
rhubarb-0.4.2 | lib/rhubarb/column.rb |
rhubarb-0.4.0 | lib/rhubarb/column.rb |
rhubarb-0.3.0 | lib/rhubarb/column.rb |