Class: Bootstrap::Generators::PartialGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Bootstrap::Generators::PartialGenerator
- Defined in:
- lib/generators/bootstrap/partial/partial_generator.rb
Instance Attribute Summary collapse
-
#app_name ⇒ Object
readonly
Returns the value of attribute app_name.
Instance Method Summary collapse
Instance Attribute Details
#app_name ⇒ Object (readonly)
Returns the value of attribute app_name.
11 12 13 |
# File 'lib/generators/bootstrap/partial/partial_generator.rb', line 11 def app_name @app_name end |
Instance Method Details
#generate_partial ⇒ Object
13 14 15 16 17 |
# File 'lib/generators/bootstrap/partial/partial_generator.rb', line 13 def generate_partial app = ::Rails.application ext = app.config.generators.[:rails][:template_engine] || :erb copy_file "_#{component_name}.html.#{ext}", "app/views/shared/_#{component_name}.html.#{ext}" end |