Sha256: 71ed1aa75154d97b5b8819908fe9333abfa16718d7790a9f4d312e0f85aa267d

Contents?: true

Size: 721 Bytes

Versions: 43

Compression:

Stored size: 721 Bytes

Contents

module RubyApp

  module Elements

    module Mobile

      module Inputs
        require 'ruby_app/elements/mobile/input'

        class ToggleInput < RubyApp::Elements::Mobile::Input

          class ChangedEvent < RubyApp::Elements::Mobile::Input::ChangedEvent

            def initialize(data)
              super(data)
              @value = @value.to_b
            end

          end

          template_path(:all, File.dirname(__FILE__))

          exclude_parent_template(:all)

          def initialize
            super
            self.attributes.delete('type')
            self.attributes.merge!('data-role' => 'slider')

            @value = false

          end

        end

      end

    end

  end

end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
RubyApp-0.6.65 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.64 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.63 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.62 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.61 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.60 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.59 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.58 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.57 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.53 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.52 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.51 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.50 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.49 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.48 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.47 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.46 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.45 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.44 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.43 lib/ruby_app/elements/mobile/inputs/toggle_input.rb