Class: Noir::Command::New

Inherits:
Base::Command show all
Defined in:
lib/noir/command/new.rb

Defined Under Namespace

Classes: GitIgnore, HgIgnore, Makefile, Note

Class Method Summary collapse

Methods inherited from Base::Command

check_command_not_found, description, execute, sub_commands

Class Method Details

.createFile(filename, text = '') ⇒ Object



4
5
6
7
8
# File 'lib/noir/command/new.rb', line 4

def self.createFile filename, text=''
  File.open(filename, 'w') do |file|
    file.write(text.sub(/^\n/, ''))
  end
end