Sha256: 41486a3028a0a0d3e639cfd28e15aa972d5412e3211a42e7371a687cd4031ee3

Contents?: true

Size: 896 Bytes

Versions: 317

Compression:

Stored size: 896 Bytes

Contents

class Chef
  module EventDispatch
    class EventsOutputStream
      # This is a fake stream that connects to events.
      #
      # == Arguments
      # events: the EventDispatch object to send data to (run_context.events)
      # options is a hash with these possible options:
      # - name: a string that identifies the stream to the user. Preferably short.

      def initialize(events, options = {})
        @events = events
        @options = options
        events.stream_opened(self, options)
      end

      attr_reader :options
      attr_reader :events

      def print(str)
        events.stream_output(self, str, options)
      end

      def <<(str)
        events.stream_output(self, str, options)
      end

      def write(str)
        events.stream_output(self, str, options)
      end

      def close
        events.stream_closed(self, options)
      end
    end
  end
end

Version data entries

317 entries across 317 versions & 1 rubygems

Version Path
chef-18.6.2-universal-mingw-ucrt lib/chef/event_dispatch/events_output_stream.rb
chef-18.6.2 lib/chef/event_dispatch/events_output_stream.rb
chef-17.10.163-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-17.10.163 lib/chef/event_dispatch/events_output_stream.rb
chef-18.5.0-x64-mingw-ucrt lib/chef/event_dispatch/events_output_stream.rb
chef-18.5.0 lib/chef/event_dispatch/events_output_stream.rb
chef-18.4.12-x64-mingw-ucrt lib/chef/event_dispatch/events_output_stream.rb
chef-18.4.12 lib/chef/event_dispatch/events_output_stream.rb
chef-17.10.122-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-17.10.122 lib/chef/event_dispatch/events_output_stream.rb
chef-17.10.114-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-17.10.114 lib/chef/event_dispatch/events_output_stream.rb
chef-18.4.2-x64-mingw-ucrt lib/chef/event_dispatch/events_output_stream.rb
chef-18.4.2 lib/chef/event_dispatch/events_output_stream.rb
chef-17.10.95-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-17.10.95 lib/chef/event_dispatch/events_output_stream.rb
chef-18.3.0-x64-mingw-ucrt lib/chef/event_dispatch/events_output_stream.rb
chef-18.3.0 lib/chef/event_dispatch/events_output_stream.rb
chef-17.10.68-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-18.2.7-x64-mingw-ucrt lib/chef/event_dispatch/events_output_stream.rb