class ActiveRecordSchemaScrapper
Constants
- ErrorObject
- VERSION
Attributes
association_opts[R]
attribute_opts[R]
model[R]
Public Class Methods
new(model:, association_opts: {}, attribute_opts: {})
click to toggle source
# File lib/active_record_schema_scrapper.rb, line 9 def initialize(model:, association_opts: {}, attribute_opts: {}) @model = model @association_opts = association_opts.merge(model: model) @attribute_opts = attribute_opts.merge(model: model) end
Public Instance Methods
abstract_class?()
click to toggle source
# File lib/active_record_schema_scrapper.rb, line 27 def abstract_class? !!model.abstract_class? end
associations()
click to toggle source
# File lib/active_record_schema_scrapper.rb, line 15 def associations @associations ||= Associations.new(association_opts) end
attributes()
click to toggle source
# File lib/active_record_schema_scrapper.rb, line 19 def attributes @attributes ||= Attributes.new(attribute_opts) end
table_name()
click to toggle source
# File lib/active_record_schema_scrapper.rb, line 23 def table_name model.table_name end