Sha256: aa57670a50883a8f3695a385c047501b1c0bd9300af609a353ec05957c9ee857

Contents?: true

Size: 679 Bytes

Versions: 13

Compression:

Stored size: 679 Bytes

Contents

module Celerity

  class TableCell < Element
    include Celerity::Exception
    include ClickableElement
    include Container

    TAGS = [ Identifier.new('td') ]
    ATTRIBUTES = BASE_ATTRIBUTES | CELLHALIGN_ATTRIBUTES |
                 CELLVALIGN_ATTRIBUTES | [:abbr, :axis, :headers, :scope, :rowspan, :colspan]

    DEFAULT_HOW = :id

    alias_method :to_s, :text # why?

    def colspan
      assert_exists
      attribute_value = @object.getAttributeValue('colspan').to_i
      attribute_value > 0 ? attribute_value : 1
    end

  end

  #-- needs code review regarding attributes/correctness of this
  class Th < TableCell
    TAGS = [ Identifier.new('th')]
  end

end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
jarib-celerity-0.0.5.10 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.5.11 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.5.6 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.5.7 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.5.8 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.5.9 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.1 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.2 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.3 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.4 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.5 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6 lib/celerity/elements/table_cell.rb
celerity-0.0.6 lib/celerity/elements/table_cell.rb