Sha256: 47daff4bdaf2d5ffcaf1b1d1bf9fb3b4f5ed9219f15351639d72a0a42310286f

Contents?: true

Size: 608 Bytes

Versions: 1

Compression:

Stored size: 608 Bytes

Contents

# module Celerity
#   class GenericField < Element
#     include Container
#     RADIO_CHECK = CheckBox::TAGS | Radio::TAGS
#     TAGS = TextField::TAGS | Hidden::TAGS | RADIO_CHECK
#     DEFAULT_HOW = :name
# 
#     def set?
#       assert_exists
#       assert_radio_check
#       @object.isChecked
#     end
#     alias_method :checked?, :set?
# 
#   protected
#     def assert_radio_check
#       locator = ElementLocator.new(@container, self.class)
#       raise "Not a radio or checkbox" unless RADIO_CHECK.any? { |ident| locator.send(:element_matches_ident?, @object, ident) }
#     end
#   end
# end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dstrelau-webrat-0.5.1 lib/webrat/culerity/core_ext/generic_field.rb