Class: Tablecon::Column
- Inherits:
-
Object
- Object
- Tablecon::Column
- Defined in:
- lib/tablecon.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
Returns the value of attribute length.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #==(col) ⇒ Object
-
#initialize(name, length) ⇒ Column
constructor
A new instance of Column.
- #to_s ⇒ Object
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
#length ⇒ Object
Returns the value of attribute length.
129 130 131 |
# File 'lib/tablecon.rb', line 129 def length @length end |
#name ⇒ Object
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_s ⇒ Object
137 138 139 |
# File 'lib/tablecon.rb', line 137 def to_s "Column[name=#{@name} length=#{@length}]" end |