Module: Dkdeploy::Typo3::Cms::Helpers::Erb
- Defined in:
- lib/dkdeploy/typo3/cms/helpers/erb.rb
Overview
Erb related helpers
Instance Method Summary collapse
-
#default_template_file ⇒ String
Return path to default template file for “AdditionalConfiguration.php” at gem.
-
#sanitize_php(php_code) ⇒ String
Remove “<?php” at beginning and “?>” at end of string.
Instance Method Details
#default_template_file ⇒ String
Return path to default template file for “AdditionalConfiguration.php” at gem
18 19 20 |
# File 'lib/dkdeploy/typo3/cms/helpers/erb.rb', line 18 def default_template_file File.join(__dir__, '..', '..', '..', '..', '..', 'vendor', 'AdditionalConfiguration.php.erb') end |
#sanitize_php(php_code) ⇒ String
Remove “<?php” at beginning and “?>” at end of string
11 12 13 |
# File 'lib/dkdeploy/typo3/cms/helpers/erb.rb', line 11 def sanitize_php(php_code) php_code.strip.reverse.chomp('php?<').reverse.chomp('?>').strip.concat("\n") end |