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.6.39 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.38 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.36 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.35 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.34 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.33 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.32 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.31 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.29 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.28 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.27 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.26 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.25 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.24 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.22 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.21 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.16 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.12 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.11 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.6.10 lib/ruby_app/elements/mobile/inputs/toggle_input.rb