Class: RailsLens::Config
- Inherits:
-
Object
- Object
- RailsLens::Config
- Defined in:
- lib/rails_lens/configuration.rb
Instance Attribute Summary collapse
-
#annotations ⇒ Object
Returns the value of attribute annotations.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#erd ⇒ Object
Returns the value of attribute erd.
-
#extensions ⇒ Object
Returns the value of attribute extensions.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#mailers ⇒ Object
Returns the value of attribute mailers.
-
#model_sources ⇒ Object
Returns the value of attribute model_sources.
-
#raise_on_error ⇒ Object
Returns the value of attribute raise_on_error.
-
#routes ⇒ Object
Returns the value of attribute routes.
-
#schema ⇒ Object
Returns the value of attribute schema.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/rails_lens/configuration.rb', line 8 def initialize @verbose = false @debug = false @raise_on_error = false @logger = nil @annotations = { position: :before, format: :rdoc } @erd = { output_dir: 'doc/erd', orientation: 'TB', theme: true, default_colors: %w[ lightblue lightcoral lightgreen lightyellow plum lightcyan lightgray ] } @schema = { adapter: :auto, include_notes: true, exclude_tables: nil, # Will use ActiveRecord::SchemaDumper.ignore_tables if nil format_options: { show_defaults: true, show_comments: true, show_foreign_keys: true, show_indexes: true, show_check_constraints: true, show_triggers: true, show_functions: true, show_callbacks: true } } @extensions = { enabled: true, autoload: true, interface_version: '1.0', ignore: [], custom_paths: [], error_reporting: :warn, # :silent, :warn, :verbose fail_safe_mode: true, # Continue processing if extensions fail track_health: false # Track extension success/failure rates } @routes = { enabled: true, include_defaults: true, include_constraints: true, pattern: '**/*_controller.rb', exclusion_pattern: 'vendor/**/*_controller.rb' } @mailers = { enabled: true, include_templates: true, include_delivery_methods: true, include_variables: true, include_locales: true, include_defaults: true, pattern: '**/*_mailer.rb', exclusion_pattern: 'vendor/**/*_mailer.rb' } @model_sources = { enabled: true, # Enable gem-provided model sources error_reporting: :warn # :silent, :warn, :verbose } end |
Instance Attribute Details
#annotations ⇒ Object
Returns the value of attribute annotations.
5 6 7 |
# File 'lib/rails_lens/configuration.rb', line 5 def annotations @annotations end |
#debug ⇒ Object
Returns the value of attribute debug.
5 6 7 |
# File 'lib/rails_lens/configuration.rb', line 5 def debug @debug end |
#erd ⇒ Object
Returns the value of attribute erd.
5 6 7 |
# File 'lib/rails_lens/configuration.rb', line 5 def erd @erd end |
#extensions ⇒ Object
Returns the value of attribute extensions.
5 6 7 |
# File 'lib/rails_lens/configuration.rb', line 5 def extensions @extensions end |
#logger ⇒ Object
Returns the value of attribute logger.
5 6 7 |
# File 'lib/rails_lens/configuration.rb', line 5 def logger @logger end |
#mailers ⇒ Object
Returns the value of attribute mailers.
5 6 7 |
# File 'lib/rails_lens/configuration.rb', line 5 def mailers @mailers end |
#model_sources ⇒ Object
Returns the value of attribute model_sources.
5 6 7 |
# File 'lib/rails_lens/configuration.rb', line 5 def model_sources @model_sources end |
#raise_on_error ⇒ Object
Returns the value of attribute raise_on_error.
5 6 7 |
# File 'lib/rails_lens/configuration.rb', line 5 def raise_on_error @raise_on_error end |
#routes ⇒ Object
Returns the value of attribute routes.
5 6 7 |
# File 'lib/rails_lens/configuration.rb', line 5 def routes @routes end |
#schema ⇒ Object
Returns the value of attribute schema.
5 6 7 |
# File 'lib/rails_lens/configuration.rb', line 5 def schema @schema end |
#verbose ⇒ Object
Returns the value of attribute verbose.
5 6 7 |
# File 'lib/rails_lens/configuration.rb', line 5 def verbose @verbose end |