Sha256: f6c8535304b167bdf1d9d6f1fd33db1f2135719a68d163d291db9a0d0d6ee5c2

Contents?: true

Size: 464 Bytes

Versions: 4

Compression:

Stored size: 464 Bytes

Contents

module Cello
  module Structure
    module CheckboxHelper
      def define_extras_for_checkbox(name)
        define_method "#{name}_check" do
          send(name).set
        end
        define_method "#{name}_uncheck" do
          send(name).clear
        end
        define_method "#{name}_is_checked?" do
          send(name).set?
        end
        define_method "#{name}_is_unchecked?" do
          !(send(name).set?)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cello-0.0.19 lib/cello/structure/html_elements/checkbox_helper.rb
cello-0.0.17 lib/cello/structure/html_elements/checkbox_helper.rb
cello-0.0.16 lib/cello/structure/html_elements/checkbox_helper.rb
cello-0.0.12 lib/cello/Checkbox_helper.rb