Class: Lagoon::Configuration
- Inherits:
-
Object
- Object
- Lagoon::Configuration
- Defined in:
- lib/lagoon/configuration.rb,
sig/lagoon.rbs
Constant Summary collapse
- DIRECTIONS =
%w[TB BT LR RL].freeze
Instance Attribute Summary collapse
-
#diagram_direction ⇒ String
Returns the value of attribute diagram_direction.
-
#exclude_controllers ⇒ Array[String]
Returns the value of attribute exclude_controllers.
-
#exclude_models ⇒ Array[String]
Returns the value of attribute exclude_models.
-
#exclude_tables ⇒ Array[String]
Returns the value of attribute exclude_tables.
-
#helper_models ⇒ Hash[String, String]
Returns the value of attribute helper_models.
-
#include_framework_bases ⇒ Boolean
Returns the value of attribute include_framework_bases.
-
#include_inheritance ⇒ Boolean
Returns the value of attribute include_inheritance.
-
#internal_tables ⇒ Array[String]
Returns the value of attribute internal_tables.
-
#output_dir ⇒ String
Returns the value of attribute output_dir.
-
#show_attributes ⇒ Boolean
Returns the value of attribute show_attributes.
-
#show_methods ⇒ Boolean
Returns the value of attribute show_methods.
-
#strict ⇒ Boolean
Returns the value of attribute strict.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #initialize_copy(original) ⇒ void
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/lagoon/configuration.rb', line 13 def initialize self.output_dir = 'doc/diagrams' self.diagram_direction = 'TB' @show_attributes = true @show_methods = false @include_inheritance = true @exclude_models = [] @exclude_controllers = [] @exclude_tables = [] @internal_tables = %w[schema_migrations ar_internal_metadata] @include_framework_bases = false @strict = false @helper_models = { 'current_user' => 'User' } end |
Instance Attribute Details
#diagram_direction ⇒ String
Returns the value of attribute diagram_direction.
11 12 13 |
# File 'lib/lagoon/configuration.rb', line 11 def diagram_direction @diagram_direction end |
#exclude_controllers ⇒ Array[String]
Returns the value of attribute exclude_controllers.
7 8 9 |
# File 'lib/lagoon/configuration.rb', line 7 def exclude_controllers @exclude_controllers end |
#exclude_models ⇒ Array[String]
Returns the value of attribute exclude_models.
7 8 9 |
# File 'lib/lagoon/configuration.rb', line 7 def exclude_models @exclude_models end |
#exclude_tables ⇒ Array[String]
Returns the value of attribute exclude_tables.
7 8 9 |
# File 'lib/lagoon/configuration.rb', line 7 def exclude_tables @exclude_tables end |
#helper_models ⇒ Hash[String, String]
Returns the value of attribute helper_models.
7 8 9 |
# File 'lib/lagoon/configuration.rb', line 7 def helper_models @helper_models end |
#include_framework_bases ⇒ Boolean
Returns the value of attribute include_framework_bases.
7 8 9 |
# File 'lib/lagoon/configuration.rb', line 7 def include_framework_bases @include_framework_bases end |
#include_inheritance ⇒ Boolean
Returns the value of attribute include_inheritance.
7 8 9 |
# File 'lib/lagoon/configuration.rb', line 7 def include_inheritance @include_inheritance end |
#internal_tables ⇒ Array[String]
Returns the value of attribute internal_tables.
7 8 9 |
# File 'lib/lagoon/configuration.rb', line 7 def internal_tables @internal_tables end |
#output_dir ⇒ String
Returns the value of attribute output_dir.
11 12 13 |
# File 'lib/lagoon/configuration.rb', line 11 def output_dir @output_dir end |
#show_attributes ⇒ Boolean
Returns the value of attribute show_attributes.
7 8 9 |
# File 'lib/lagoon/configuration.rb', line 7 def show_attributes @show_attributes end |
#show_methods ⇒ Boolean
Returns the value of attribute show_methods.
7 8 9 |
# File 'lib/lagoon/configuration.rb', line 7 def show_methods @show_methods end |
#strict ⇒ Boolean
Returns the value of attribute strict.
7 8 9 |
# File 'lib/lagoon/configuration.rb', line 7 def strict @strict end |
Class Method Details
.validate_direction!(value) ⇒ String
39 40 41 42 43 44 45 |
# File 'lib/lagoon/configuration.rb', line 39 def self.validate_direction!(value) direction = value.to_s.upcase return direction if DIRECTIONS.include?(direction) raise ConfigurationError, "Invalid diagram direction #{value.inspect}; expected one of #{DIRECTIONS.join(', ')}" end |
Instance Method Details
#initialize_copy(original) ⇒ void
This method returns an undefined value.
47 48 49 50 51 52 53 54 |
# File 'lib/lagoon/configuration.rb', line 47 def initialize_copy(original) super @exclude_models = original.exclude_models.dup @exclude_controllers = original.exclude_controllers.dup @exclude_tables = original.exclude_tables.dup @internal_tables = original.internal_tables.dup @helper_models = original.helper_models.dup end |