Sha256: 08c573c198f60ebc16efaf1458598d097ae977508d065817f7d754d9bbd77b5f

Contents?: true

Size: 741 Bytes

Versions: 13

Compression:

Stored size: 741 Bytes

Contents

module Gametel
  module Views
    class Spinner < View

      SPINNER_CLASS = 'android.widget.Spinner'

      protected

      def build_property_methods
        metaclass = class << self; self; end
        properties.each do |property|
          metaclass.send(:define_method, "#{property}?".to_sym) do
            
            platform.get_view_by_id(locator[:id]) do |device|
              device.send "is_#{property}"
            end if locator[:id]
            
            platform.get_view_by_index(SPINNER_CLASS, locator[:index]) do |device|
              device.send "is_#{property}"
            end if locator[:index]

            platform.last_response.body == "true"
          end
        end
      end

      
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
gametel-0.7 lib/gametel/views/spinner.rb
gametel-0.6 lib/gametel/views/spinner.rb
gametel-0.5.9.3 lib/gametel/views/spinner.rb
gametel-0.5.9.2 lib/gametel/views/spinner.rb
gametel-0.5.9.1 lib/gametel/views/spinner.rb
gametel-0.5.9 lib/gametel/views/spinner.rb
gametel-0.5.8.1 lib/gametel/views/spinner.rb
gametel-0.5.8 lib/gametel/views/spinner.rb
gametel-0.5.7 lib/gametel/views/spinner.rb
gametel-0.5.6 lib/gametel/views/spinner.rb
gametel-0.5.5 lib/gametel/views/spinner.rb
gametel-0.5.4 lib/gametel/views/spinner.rb
gametel-0.5.3 lib/gametel/views/spinner.rb