Class: PolyglotFlutter::IO::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/flutter_polyglot_cli/io/config.rb

Constant Summary collapse

CONFIG_FILE_PATH =
"#{Dir.pwd}/polyflut.yml".freeze

Class Method Summary collapse

Class Method Details

.readObject



12
13
14
# File 'lib/flutter_polyglot_cli/io/config.rb', line 12

def read
  YAML.load_file(CONFIG_FILE_PATH)
end

.write(data) ⇒ Object



8
9
10
# File 'lib/flutter_polyglot_cli/io/config.rb', line 8

def write(data)
  File.open(CONFIG_FILE_PATH, 'w') { |file| YAML.dump(data, file) }
end