Sha256: 1409c27360858ae54038031d24fb0231b77e47165978436229d91ea0941bd955

Contents?: true

Size: 507 Bytes

Versions: 8

Compression:

Stored size: 507 Bytes

Contents

module Druid
  module Elements
    class CheckBox < Element

      def self.finders
        super + [:value]
      end

      #
      # Check the checkbox
      #
      def check
        element.set
      end

      #
      # Uncheck the CheckBox
      #
      def uncheck
        element.clear
      end

      #
      # Return true if checkbox is checked
      #
      def checked?
        element.set?
      end
    end

    Druid::Elements.type_to_class[:checkbox] = Druid::Elements::CheckBox
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
druid-ts-1.1.7 lib/druid/elements/check_box.rb
druid-ts-1.1.6 lib/druid/elements/check_box.rb
druid-ts-1.1.5 lib/druid/elements/check_box.rb
druid-ts-1.1.4 lib/druid/elements/check_box.rb
druid-ts-1.1.3 lib/druid/elements/check_box.rb
druid-ts-1.1.2 lib/druid/elements/check_box.rb
druid-ts-1.1.1 lib/druid/elements/check_box.rb
druid-ts-1.1.0 lib/druid/elements/check_box.rb