Sha256: b4cc12660602b1baa97f2cf5d2834021c40f0faee69ee1ab5f3236f0a7ba6ccc

Contents?: true

Size: 1.42 KB

Versions: 5

Compression:

Stored size: 1.42 KB

Contents

module Fluent
  module Enclosers

    # Provides a context for an action that will generate a JavaScript alert
    # message box. The alert invocation will be overridden by the platform.
    #
    # @param block [Proc] the code that generates the alert
    # @return [String] the message contained in the alert message box
    def will_alert(&block)
      platform.will_alert(&block)
    end

    # Provides a context for an action that will generate a JavaScript
    # confirmation message box. The confirmation invocation will be
    # overridden by the platform.
    #
    # @param response [Boolean] true to accept the confirmation, false to cancel it
    # @param block [Proc] the code that generates the confirmation
    # @return [String] the message contained in the confirmation message box
    def will_confirm(response, &block)
      platform.will_confirm(response, &block)
    end

    # Provides a context for an action that will generate a JavaScript prompt
    # message box. The prompt invocation will be overridden by the platform.
    #
    # @param response [String] the value to be used in the prompt
    # @param block [Proc] the code that generates the prompt
    # @return [Hash] :message for the prompt message, :default_value for
    # the value that the prompt had before the response was applied
    def will_prompt(response, &block)
      platform.will_prompt(response, &block)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fluent-0.6.0 lib/fluent/enclosers.rb
fluent-0.5.0 lib/fluent/enclosers.rb
fluent-0.4.0 lib/fluent/enclosers.rb
fluent-0.3.0 lib/fluent/enclosers.rb
fluent-0.2.0 lib/fluent/enclosers.rb