Class: ForestLiana::SchemaAdapter
- Inherits:
-
Object
- Object
- ForestLiana::SchemaAdapter
- Defined in:
- app/services/forest_liana/schema_adapter.rb
Instance Method Summary collapse
-
#initialize(model) ⇒ SchemaAdapter
constructor
A new instance of SchemaAdapter.
- #perform ⇒ Object
Constructor Details
#initialize(model) ⇒ SchemaAdapter
Returns a new instance of SchemaAdapter.
3 4 5 |
# File 'app/services/forest_liana/schema_adapter.rb', line 3 def initialize(model) @model = model end |
Instance Method Details
#perform ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/services/forest_liana/schema_adapter.rb', line 7 def perform @collection = ForestLiana::Collection.new({ name: @model.name.tableize, fields: [] }) add_columns add_associations @collection end |