Class: HashSyntax::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/hash_syntax/runner.rb

Instance Method Summary collapse

Instance Method Details

#run!Object



4
5
6
7
8
9
10
11
12
# File 'lib/hash_syntax/runner.rb', line 4

def run!
  options = gather_options
  validate_options(options)
  files = gather_files
  files.each do |name|
    transformed_file = Transformer.transform(File.read(name), options)
    File.open(name, 'w') { |fp| fp.write(transformed_file) }
  end
end