Class: Tablecon::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/tablecon.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, length) ⇒ Column

Returns a new instance of Column.



130
131
132
133
# File 'lib/tablecon.rb', line 130

def initialize name, length
	@name = name
	@length = length
end

Instance Attribute Details

#lengthObject

Returns the value of attribute length.



129
130
131
# File 'lib/tablecon.rb', line 129

def length
  @length
end

#nameObject

Returns the value of attribute name.



129
130
131
# File 'lib/tablecon.rb', line 129

def name
  @name
end

Instance Method Details

#==(col) ⇒ Object



134
135
136
# File 'lib/tablecon.rb', line 134

def == col
	@name == col.name and @length == col.length 
end

#to_sObject



137
138
139
# File 'lib/tablecon.rb', line 137

def to_s
	"Column[name=#{@name} length=#{@length}]"
end