Class: Pah::Templates::Inflection
- Inherits:
-
Pah::Template
- Object
- Rails::Generators::Base
- Pah::Template
- Pah::Templates::Inflection
- Defined in:
- lib/pah/templates/inflection.rb
Instance Method Summary collapse
Methods inherited from Pah::Template
#ask_unless_test, #copy_static_file, #git_commit, #static_files, #will_you_like_to?
Instance Method Details
#call ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/pah/templates/inflection.rb', line 4 def call api_acronym_config = <<API_ACRONYM ActiveSupport::Inflector.inflections do |inflect| inflect.acronym 'API' end API_ACRONYM inject_into_file 'config/initializers/inflections.rb', api_acronym_config, after: /'RESTful'\n#\ end\n/, verbose: false git add: 'config/initializers/inflections.rb' git_commit 'Add API acronym to inflections.rb.' end |