Sha256: 14a8cb87c34679861731b1cc04135cf53e975eebdacf8e7f2405b82c6521c1ff

Contents?: true

Size: 808 Bytes

Versions: 38

Compression:

Stored size: 808 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,
                   :colspan,
                   :headers,
                   :rowspan,
                   :scope,
                 ]

    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

38 entries across 38 versions & 6 rubygems

Version Path
celerity_thingista-0.9.3 lib/celerity/elements/table_cell.rb
celerity_thingista-0.9.2 lib/celerity/elements/table_cell.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/lib/celerity/elements/table_cell.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/lib/celerity/elements/table_cell.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/lib/celerity/elements/table_cell.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/lib/celerity/elements/table_cell.rb
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/celerity-0.9.2/lib/celerity/elements/table_cell.rb
celerity-0.9.2 lib/celerity/elements/table_cell.rb
celerity-0.9.1 lib/celerity/elements/table_cell.rb
no-click-exception-celerity-0.9.0 lib/celerity/elements/table_cell.rb
celerity-0.9.0 lib/celerity/elements/table_cell.rb
celerity-0.8.9 lib/celerity/elements/table_cell.rb
celerity-0.8.9.pre lib/celerity/elements/table_cell.rb
celerity-0.8.8 lib/celerity/elements/table_cell.rb
celerity-0.8.7 lib/celerity/elements/table_cell.rb
celerity-0.8.6 lib/celerity/elements/table_cell.rb
celerity-0.8.5 lib/celerity/elements/table_cell.rb
celerity-0.8.4 lib/celerity/elements/table_cell.rb
celerity-0.8.2 lib/celerity/elements/table_cell.rb
celerity-0.8.1 lib/celerity/elements/table_cell.rb