Class: Boiler::Generator::Script

Inherits:
Base
  • Object
show all
Defined in:
lib/boiler/generator/script.rb

Instance Attribute Summary

Attributes inherited from Base

#arguments, #options

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Boiler::Generator::Base

Instance Method Details

#executeObject



3
4
5
6
7
8
9
10
11
12
# File 'lib/boiler/generator/script.rb', line 3

def execute
  file = @arguments.first

  if file
    write_file(file, template)
    chmod(0755, file)
  else
    puts template
  end
end