Class: Yalphabetize::Writer

Inherits:
Object
  • Object
show all
Defined in:
lib/yalphabetize/writer.rb

Constant Summary collapse

MAX_LINE_WIDTH =
-1

Instance Method Summary collapse

Constructor Details

#initialize(stream_node, path) ⇒ Writer

Returns a new instance of Writer.



7
8
9
10
# File 'lib/yalphabetize/writer.rb', line 7

def initialize(stream_node, path)
  @stream_node = stream_node
  @path = path
end

Instance Method Details

#callObject



12
13
14
15
16
# File 'lib/yalphabetize/writer.rb', line 12

def call
  indent_sequences

  File.write(path, new_file_content)
end