Sha256: e762490e2c5bf1b91445ffbbe4fde93a61e79399c1f41164947d403531acc354

Contents?: true

Size: 827 Bytes

Versions: 5

Compression:

Stored size: 827 Bytes

Contents

# frozen_string_literal: true

module Vedeu

  module Output

    # @see Vedeu::Bindings::System#refresh!
    class Refresh

      # @return (see #all)
      def self.all
        new.all
      end

      # Return a new instance of Vedeu::Output::Refresh.
      #
      # @return [Vedeu::Output::Refresh]
      def initialize; end

      # Refresh all registered interfaces.
      #
      # @return [Array<Vedeu::Interfaces::Interface>]
      def all
        Vedeu.timer('Refreshing all') do
          Vedeu.interfaces.zindexed.each do |interface|
            Vedeu.trigger(:_refresh_view_, interface.name)
          end
        end
      end

    end # Refresh

  end # Output

  # :nocov:

  # See {file:docs/events/refresh.md}
  Vedeu.bind(:_refresh_) { Vedeu::Output::Refresh.all if Vedeu.ready? }

  # :nocov:

end # Vedeu

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vedeu-0.8.15 lib/vedeu/output/refresh.rb
vedeu-0.8.14 lib/vedeu/output/refresh.rb
vedeu-0.8.13 lib/vedeu/output/refresh.rb
vedeu-0.8.12 lib/vedeu/output/refresh.rb
vedeu-0.8.10 lib/vedeu/output/refresh.rb