Sha256: d0274a5fcee0cf3dc5c5ce94ec3328e8210e02ad885f863dd37a958fc3d2b3e5

Contents?: true

Size: 552 Bytes

Versions: 9

Compression:

Stored size: 552 Bytes

Contents

module Mohawk
  module Adapters
    module UIA
      class Spinner < Control
        valid_patterns :range_value

        def value=(value)
          spinner.value = value
        end

        def value
          spinner.value
        end

        def increment
          self.value = value + spinner.small_change
        end

        def decrement
          self.value = value - spinner.small_change
        end

        private
        def spinner
          element.as :range_value
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mohawk-1.0 lib/mohawk/adapters/uia/spinner.rb
mohawk-0.4.4 lib/mohawk/adapters/uia/spinner.rb
mohawk-0.4.3 lib/mohawk/adapters/uia/spinner.rb
mohawk-0.4.2 lib/mohawk/adapters/uia/spinner.rb
mohawk-0.4.1 lib/mohawk/adapters/uia/spinner.rb
mohawk-0.4 lib/mohawk/adapters/uia/spinner.rb
mohawk-0.3 lib/mohawk/adapters/uia/spinner.rb
mohawk-0.2.1 lib/mohawk/adapters/uia/spinner.rb
mohawk-0.2 lib/mohawk/adapters/uia/spinner.rb