Module: ROM::Files::Plugins::Schema::Contents
- Defined in:
- lib/rom/files/plugins/schema/contents.rb
Overview
A plugin for automatically adding contents of file to the schema definition
Defined Under Namespace
Modules: DSL
Constant Summary collapse
Class Method Summary collapse
Class Method Details
.apply(schema, name: NAME, type: TYPE) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
35 36 37 38 39 40 41 |
# File 'lib/rom/files/plugins/schema/contents.rb', line 35 def self.apply(schema, name: NAME, type: TYPE) contents = type.(name: name, source: schema.name, DATA: true) schema.attributes.concat( schema.class.attributes([contents], schema.attr_class) ) end |