lib/ronin/gen/source_code_generator.rb in ronin-gen-1.1.0.rc1 vs lib/ronin/gen/source_code_generator.rb in ronin-gen-1.1.0.rc2

- old
+ new

@@ -1,7 +1,7 @@ # -# Copyright (c) 2009-2011 Hal Brodigan (postmodern.mod3 at gmail.com) +# Copyright (c) 2009-2012 Hal Brodigan (postmodern.mod3 at gmail.com) # # This file is part of Ronin Gen. # # Ronin Gen is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,15 +24,15 @@ # # A {FileGenerator} class for creating source-code files. # class SourceCodeGenerator < FileGenerator - parameter :editor, :type => String, + parameter :editor, :type => String, :default => ENV['EDITOR'] - parameter :no_edit, :type => true, - :default => false + parameter :edit, :type => true, + :default => true # # Generates the source code file and spawns a text-editor. # # @since 1.1.0 @@ -40,10 +40,10 @@ # @api semipublic # def generate template self.class.template, @path - if (no_edit? && editor?) + if (edit? && editor?) # spawn the text editor for the newly generated file system(editor,@path) end end