Class: Creng::FileTweaker
- Inherits:
-
Object
- Object
- Creng::FileTweaker
- Defined in:
- lib/creng/file_tweaker.rb
Class Method Summary collapse
-
.cutDebugMessages(text) ⇒ Object
cutting all console.* calls.
-
.cutDevBlock(text) ⇒ Object
cutting blocks of code, marked as ###devblock_begin and ###devblock_end returns modified text of file.
- .manifestTweak ⇒ Object
Class Method Details
.cutDebugMessages(text) ⇒ Object
cutting all console.* calls
16 17 18 19 20 21 22 |
# File 'lib/creng/file_tweaker.rb', line 16 def self.cutDebugMessages text text = text.gsub(/console\..*?\(.*\)(\;)?/, "") text end |
.cutDevBlock(text) ⇒ Object
cutting blocks of code, marked as ###devblock_begin and ###devblock_end returns modified text of file
7 8 9 10 11 12 |
# File 'lib/creng/file_tweaker.rb', line 7 def self.cutDevBlock text text = text.gsub(/\/\/devblock_begin(.|\n)*?\/\/devblock_end/, "") text end |
.manifestTweak ⇒ Object
24 25 26 27 28 |
# File 'lib/creng/file_tweaker.rb', line 24 def self.manifestTweak end |