Sha256: ad802d9ca85351b6b33cd5b6a41c43cf1c0b7211be4c45b6fb65837c1f1ffad3

Contents?: true

Size: 557 Bytes

Versions: 24

Compression:

Stored size: 557 Bytes

Contents

module WWW
  class Mechanize
    class Form
      # This class represents an image button in a form.  Use the x and y methods
      # to set the x and y positions for where the mouse "clicked".
      class ImageButton < Button
        attr_accessor :x, :y
        
        def initialize(name, value)
          @x = nil
          @y = nil
          super(name, value)
        end

        def query_value
            super <<
             [@name + ".x", (@x || 0).to_s] <<
             [@name + ".y", (@y || 0).to_s]
        end
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 5 rubygems

Version Path
eric-mechanize-0.9.3.20090623142847 lib/www/mechanize/form/image_button.rb
knu-mechanize-0.9.3.20090623142847 lib/www/mechanize/form/image_button.rb
tenderlove-mechanize-0.9.3.20090617085936 lib/www/mechanize/form/image_button.rb
tenderlove-mechanize-0.9.3.20090623142847 lib/www/mechanize/form/image_button.rb
mechanize-ntlm-0.9.1 lib/www/mechanize/form/image_button.rb
mechanize-0.7.7 lib/www/mechanize/form/image_button.rb
mechanize-0.7.8 lib/www/mechanize/form/image_button.rb
mechanize-0.7.5 lib/www/mechanize/form/image_button.rb
mechanize-0.7.1 lib/www/mechanize/form/image_button.rb
mechanize-0.7.6 lib/www/mechanize/form/image_button.rb
mechanize-0.7.0 lib/www/mechanize/form/image_button.rb
mechanize-0.7.4 lib/www/mechanize/form/image_button.rb
mechanize-0.8.0 lib/www/mechanize/form/image_button.rb
mechanize-0.7.3 lib/www/mechanize/form/image_button.rb
mechanize-0.7.2 lib/www/mechanize/form/image_button.rb
mechanize-0.8.1 lib/www/mechanize/form/image_button.rb
mechanize-0.8.2 lib/www/mechanize/form/image_button.rb
mechanize-0.8.3 lib/www/mechanize/form/image_button.rb
mechanize-0.8.4 lib/www/mechanize/form/image_button.rb
mechanize-0.9.1 lib/www/mechanize/form/image_button.rb