Sha256: a8dc0298cc0bc93436b4ee230cef959a2eeec0eb5903b50016217a7a41e702ad

Contents?: true

Size: 933 Bytes

Versions: 32

Compression:

Stored size: 933 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

32 entries across 32 versions & 1 rubygems

Version Path
chef-14.13.11-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-15.0.300-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-15.0.298-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-15.0.293-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-14.12.9-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-14.12.3-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-13.12.14-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-14.11.21-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-14.10.9-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-14.9.13-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-14.8.12-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-14.7.17-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-13.12.3-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-14.6.47-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-13.11.3-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-14.5.33-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-13.10.4-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-14.3.37-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-13.10.0-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb
chef-13.9.4-universal-mingw32 lib/chef/event_dispatch/events_output_stream.rb