Class: Ruboclean::StreamWriter

Inherits:
Object
  • Object
show all
Defined in:
lib/ruboclean/stream_writer.rb

Overview

Orders the items within the groups alphabetically

Instance Method Summary collapse

Constructor Details

#initialize(content, options:) ⇒ StreamWriter

Returns a new instance of StreamWriter.



6
7
8
9
# File 'lib/ruboclean/stream_writer.rb', line 6

def initialize(content, options:)
  @content = content
  @options = options
end

Instance Method Details

#write!Object



11
12
13
14
15
# File 'lib/ruboclean/stream_writer.rb', line 11

def write!
  options.output_stream.write(content) unless options.verify?

  content
end