Class: PartialKs::ConfigurationGenerator
- Inherits:
-
Object
- Object
- PartialKs::ConfigurationGenerator
- Defined in:
- lib/partial_ks/configuration_generator.rb
Overview
Given an initial table graph goes through each table not already in the table graph, and attempts to automatically populate the table into the table graph
Instance Attribute Summary collapse
-
#table_graph ⇒ Object
readonly
Returns the value of attribute table_graph.
-
#table_names ⇒ Object
readonly
Returns the value of attribute table_names.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(table_graph, table_names: nil) ⇒ ConfigurationGenerator
constructor
A new instance of ConfigurationGenerator.
Constructor Details
#initialize(table_graph, table_names: nil) ⇒ ConfigurationGenerator
Returns a new instance of ConfigurationGenerator.
7 8 9 10 |
# File 'lib/partial_ks/configuration_generator.rb', line 7 def initialize(table_graph, table_names: nil) @table_graph = table_graph @table_names = table_names || ActiveRecord::Base.connection.tables end |
Instance Attribute Details
#table_graph ⇒ Object (readonly)
Returns the value of attribute table_graph.
5 6 7 |
# File 'lib/partial_ks/configuration_generator.rb', line 5 def table_graph @table_graph end |
#table_names ⇒ Object (readonly)
Returns the value of attribute table_names.
5 6 7 |
# File 'lib/partial_ks/configuration_generator.rb', line 5 def table_names @table_names end |
Instance Method Details
#call ⇒ Object
12 13 14 |
# File 'lib/partial_ks/configuration_generator.rb', line 12 def call @filtered_tables ||= filtered_tables end |