Sha256: b26db14cc5ece22bb3e1cf8833473d6f5339fd89c0ea1b24d8e238ce60690653

Contents?: true

Size: 720 Bytes

Versions: 102

Compression:

Stored size: 720 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

102 entries across 102 versions & 1 rubygems

Version Path
RubyApp-0.5.56 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.55 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.54 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.53 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.52 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.51 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.50 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.49 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.48 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.47 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.46 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.45 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.44 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.43 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.42 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.41 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.40 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.39 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.38 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.37 lib/ruby_app/elements/mobile/inputs/toggle_input.rb