Sha256: 8b5be161b30fe51ce96a282c0f0b7c4897250780739a42abb60c5185398bf346

Contents?: true

Size: 515 Bytes

Versions: 4

Compression:

Stored size: 515 Bytes

Contents

module Druid
  module Elements
    class CheckBox < Element

      def self.finders
        super + [:value, :label]
      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

4 entries across 4 versions & 1 rubygems

Version Path
druid-ts-1.2.2 lib/druid/elements/check_box.rb
druid-ts-1.2.1 lib/druid/elements/check_box.rb
druid-ts-1.2.0 lib/druid/elements/check_box.rb
druid-ts-1.1.8 lib/druid/elements/check_box.rb