Sha256: 49ea564a85cabde89ae9d8cc5f8244417dcd460512361b4e3e93d9f6a6adb04f

Contents?: true

Size: 674 Bytes

Versions: 25

Compression:

Stored size: 674 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.getAttribute('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

25 entries across 25 versions & 6 rubygems

Version Path
caius-celerity-0.0.6.10 lib/celerity/elements/table_cell.rb
caius-celerity-0.0.6.11 lib/celerity/elements/table_cell.rb
drnic-celerity-0.0.6.17 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.10 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.11 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.12 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.14 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.15 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.16 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.17 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.18 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.19 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.6 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.7 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.8 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.6.9 lib/celerity/elements/table_cell.rb
jarib-celerity-0.0.7.1 lib/celerity/elements/table_cell.rb
regularfry-celerity-0.0.6.12 lib/celerity/elements/table_cell.rb
walidhalabi-celerity-0.0.6.11 lib/celerity/elements/table_cell.rb
walidhalabi-celerity-0.0.6.12 lib/celerity/elements/table_cell.rb