# 함수 선언 def 생성 # 파일 만들기 outfile = File.new("example.txt", "w") # 입력 outfile.write "안녕하세요nn" # 끝(파일 닫기) outfile.close end