Sha256: 6d6c64e2d03fdbbea1ac48acceda872d61d4d036be8ed415d0e39bbb52b976ca

Contents?: true

Size: 891 Bytes

Versions: 18

Compression:

Stored size: 891 Bytes

Contents

module Vedeu

  module Bindings

    # System events relating to movement of cursors or interfaces.
    #
    # :nocov:
    module Application

      extend self

      # Setup events relating to client applications. This method is called by
      # Vedeu.
      #
      # @return [TrueClass]
      def setup!
        goto!
      end

      private

      # Call a client application controller's action with parameters.
      #
      # @example
      #   Vedeu.trigger(:_goto_, :your_controller, :some_action, { id: 7 })
      #   Vedeu.goto(:your_controller, :some_action, { id: 7 })
      #
      # @return [TrueClass]
      def goto!
        Vedeu.bind(:_goto_) do |controller, action, **args|
          Vedeu::Router.goto(controller, action, **args)
        end

        Vedeu.bind_alias(:_action_, :_goto_)
      end

    end # Application
    # :nocov:

  end # Bindings

end # Vedeu

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
vedeu-0.6.6 lib/vedeu/bindings/application.rb
vedeu-0.6.5 lib/vedeu/bindings/application.rb
vedeu-0.6.4 lib/vedeu/bindings/application.rb
vedeu-0.6.3 lib/vedeu/bindings/application.rb
vedeu-0.6.2 lib/vedeu/bindings/application.rb
vedeu-0.6.1 lib/vedeu/bindings/application.rb
vedeu-0.6.0 lib/vedeu/bindings/application.rb
vedeu-0.5.13 lib/vedeu/bindings/application.rb
vedeu-0.5.12 lib/vedeu/bindings/application.rb
vedeu-0.5.11 lib/vedeu/bindings/application.rb
vedeu-0.5.10 lib/vedeu/bindings/application.rb
vedeu-0.5.9 lib/vedeu/bindings/application.rb
vedeu-0.5.8 lib/vedeu/bindings/application.rb
vedeu-0.5.7 lib/vedeu/bindings/application.rb
vedeu-0.5.6 lib/vedeu/bindings/application.rb
vedeu-0.5.5 lib/vedeu/bindings/application.rb
vedeu-0.5.4 lib/vedeu/bindings/application.rb
vedeu-0.5.3 lib/vedeu/bindings/application.rb