Sha256: 7f0a67c6983ddbfe5161e23778a826a0b34a24b7ec68a7f83da884c265ba1cca

Contents?: true

Size: 788 Bytes

Versions: 2

Compression:

Stored size: 788 Bytes

Contents

# frozen_string_literal: true

require 'rubyXL/addressing/version'

module RubyXL
  autoload :Address, 'rubyXL/address'

  module Addressing
    # @param [String, Symbol, Integer] ref_or_row is ref `'A1'`
    #                                             or row index `0`
    #                                             or row label `'1'`
    # @param [String, Symbol, Integer] column is column index `0`
    #                                         or column label `'A'`
    # @return [RubyXL::Address]
    def addr(ref_or_row, column = nil)
      if column.nil?
        RubyXL::Address.new(self, ref: ref_or_row)
      else
        RubyXL::Address.new(self, row: ref_or_row, column: column)
      end
    end
  end
end

require 'rubyXL'
RubyXL::Worksheet.include(RubyXL::Addressing)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubyXL-addressing-0.5.0 lib/rubyXL/addressing.rb
rubyXL-addressing-0.4.0 lib/rubyXL/addressing.rb