Class: ThreddedCreateApp::Tasks::Base Abstract
- Inherits:
-
Object
- Object
- ThreddedCreateApp::Tasks::Base
- Includes:
- Logging, RunCommand
- Defined in:
- lib/thredded_create_app/tasks/base.rb
Overview
This class is abstract.
Direct Known Subclasses
Generator, AddDevise, AddDisplayNameToUsers, AddInvisibleCaptcha, AddJquery, AddMemcachedSupport, AddRailsConfig, AddRailsEmailPreview, AddRoadie, AddSimpleForm, AddThredded, CreateRailsApp, Docker, ProductionConfigs, SetupAppSkeleton, SetupDatabase
Instance Attribute Summary collapse
-
#app_hostname ⇒ Object
readonly
Returns the value of attribute app_hostname.
-
#app_name ⇒ Object
readonly
Returns the value of attribute app_name.
-
#app_path ⇒ Object
readonly
Returns the value of attribute app_path.
-
#gems ⇒ Object
readonly
Returns the value of attribute gems.
Instance Method Summary collapse
- #after_bundle ⇒ Object
- #before_bundle ⇒ Object
- #devise_form_fields_begin_pattern ⇒ Object
-
#initialize(app_path:, verbose: false, database:, webpack_js: true, simple_form: true, **_args) ⇒ Base
constructor
rubocop:disable Metrics/ParameterLists.
- #summary ⇒ Object
- #webpack_js? ⇒ Boolean
Methods included from RunCommand
Methods included from Logging
#log_command, #log_error, #log_info, #log_stderr, #log_verbose, #log_warn, #program_name
Constructor Details
#initialize(app_path:, verbose: false, database:, webpack_js: true, simple_form: true, **_args) ⇒ Base
rubocop:disable Metrics/ParameterLists
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/thredded_create_app/tasks/base.rb', line 19 def initialize( # rubocop:disable Metrics/ParameterLists app_path:, verbose: false, database:, webpack_js: true, simple_form: true, **_args ) @app_path = app_path @app_name = File.basename(File.(app_path)) @app_hostname = "#{@app_name.tr(' ', '_').downcase}.com" @verbose = verbose @database_adapter_name = database.to_s @gems = [] @simple_form = simple_form @webpack_js = webpack_js end |
Instance Attribute Details
#app_hostname ⇒ Object (readonly)
Returns the value of attribute app_hostname.
17 18 19 |
# File 'lib/thredded_create_app/tasks/base.rb', line 17 def app_hostname @app_hostname end |
#app_name ⇒ Object (readonly)
Returns the value of attribute app_name.
17 18 19 |
# File 'lib/thredded_create_app/tasks/base.rb', line 17 def app_name @app_name end |
#app_path ⇒ Object (readonly)
Returns the value of attribute app_path.
17 18 19 |
# File 'lib/thredded_create_app/tasks/base.rb', line 17 def app_path @app_path end |
#gems ⇒ Object (readonly)
Returns the value of attribute gems.
17 18 19 |
# File 'lib/thredded_create_app/tasks/base.rb', line 17 def gems @gems end |
Instance Method Details
#after_bundle ⇒ Object
51 |
# File 'lib/thredded_create_app/tasks/base.rb', line 51 def after_bundle; end |
#before_bundle ⇒ Object
49 |
# File 'lib/thredded_create_app/tasks/base.rb', line 49 def before_bundle; end |
#devise_form_fields_begin_pattern ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/thredded_create_app/tasks/base.rb', line 37 def devise_form_fields_begin_pattern if @simple_form %(<div class="form-inputs">\n) else %r{render "devise/shared/error_messages", resource: resource %>\n\n} end end |
#summary ⇒ Object
45 46 47 |
# File 'lib/thredded_create_app/tasks/base.rb', line 45 def summary self.class.name end |
#webpack_js? ⇒ Boolean
33 34 35 |
# File 'lib/thredded_create_app/tasks/base.rb', line 33 def webpack_js? @webpack_js end |