Sha256: 8007437b677aa320b202cd3dc51cf6fffc14017ca993dea6a6bec45857633146

Contents?: true

Size: 758 Bytes

Versions: 50

Compression:

Stored size: 758 Bytes

Contents

module RubyApp

  module Elements

    module Dialogs

      module Base
        require 'ruby_app/elements/dialogs/blank_dialog'
        require 'ruby_app/elements/link'

        class BaseYesNoDialog < RubyApp::Elements::Dialogs::BlankDialog

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

          def initialize
            super

            @yes = RubyApp::Elements::Link.new
            @yes.clicked do |element, event|
              @response = true
              event.hide_dialog(self)
            end

            @no = RubyApp::Elements::Link.new
            @no.clicked do |element, event|
              @response = false
              event.hide_dialog(self)
            end

          end

        end

      end

    end

  end

end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
RubyApp-0.2.7 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.2.6 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.2.5 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.2.4 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.2.3 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.2.2 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.2.1 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.2.0 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.0.91 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.0.90 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.0.89 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.0.88 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.0.87 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.0.86 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.0.85 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.0.84 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.0.83 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.0.82 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.0.81 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb
RubyApp-0.0.80 lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.rb