Class: Fixnum
- Inherits:
-
Object
- Object
- Fixnum
- Defined in:
- lib/oxcelix.rb
Instance Method Summary collapse
-
#col_name ⇒ String
Returns the column name corresponding to the given number.
Instance Method Details
#col_name ⇒ String
Returns the column name corresponding to the given number. e.g: 1.col_name => ‘B’
38 39 40 41 |
# File 'lib/oxcelix.rb', line 38 def col_name val=self/26 (val > 0 ? (val - 1).col_name : "") + (self % 26 + 65).chr end |