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.36 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.35 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.34 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.33 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.32 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.31 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.30 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.29 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.28 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.23 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.18 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.17 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.16 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.15 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.14 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.13 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.12 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.11 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.10 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.9 lib/ruby_app/elements/mobile/inputs/toggle_input.rb