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.76 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.75 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.74 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.73 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.72 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.71 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.70 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.69 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.68 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.67 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.66 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.65 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.64 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.63 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.62 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.61 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.60 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.59 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.58 lib/ruby_app/elements/mobile/inputs/toggle_input.rb
RubyApp-0.5.57 lib/ruby_app/elements/mobile/inputs/toggle_input.rb