Class: Crystalball::Rails::Helpers::SchemaDefinitionParser
- Inherits:
-
Object
- Object
- Crystalball::Rails::Helpers::SchemaDefinitionParser
- Includes:
- BaseSchemaParser
- Defined in:
- lib/crystalball/rails/helpers/schema_definition_parser.rb,
lib/crystalball/rails/helpers/schema_definition_parser/active_record.rb,
lib/crystalball/rails/helpers/schema_definition_parser/table_content_parser.rb
Overview
Class used to parse ActiveRecord::Schema definition and provide hash representation
Defined Under Namespace
Modules: ActiveRecord Classes: TableContentParser
Instance Attribute Summary
Attributes included from BaseSchemaParser
Class Method Summary collapse
-
.parse(schema) ⇒ Hash
Parse schema content.
Methods included from BaseSchemaParser
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Crystalball::Rails::Helpers::BaseSchemaParser
Class Method Details
.parse(schema) ⇒ Hash
Parse schema content
17 18 19 20 21 |
# File 'lib/crystalball/rails/helpers/schema_definition_parser.rb', line 17 def self.parse(schema) return {} if schema&.empty? new.instance_eval(schema) end |