Module: Rails3::Assist::File::Environment
Instance Method Summary collapse
- #insert_after_application_init(content = nil, &block) ⇒ Object
- #insert_application_init(place, statement = nil, &block) ⇒ Object
- #insert_before_application_init(content = nil, &block) ⇒ Object
Instance Method Details
#insert_after_application_init(content = nil, &block) ⇒ Object
7 8 9 |
# File 'lib/rails3_assist/file/environment.rb', line 7 def insert_after_application_init content=nil, &block insert_application_init :after, content, &block end |
#insert_application_init(place, statement = nil, &block) ⇒ Object
11 12 13 14 |
# File 'lib/rails3_assist/file/environment.rb', line 11 def insert_application_init place, statement=nil, &block statement = block ? yield : statement File.insert_into environment_file, statement, place => /\w+::Application.initialize!/ end |
#insert_before_application_init(content = nil, &block) ⇒ Object
3 4 5 |
# File 'lib/rails3_assist/file/environment.rb', line 3 def insert_before_application_init content=nil, &block insert_application_init :before, content, &block end |