Method: Brief::Model::Definition#initialize
- Defined in:
- lib/brief/model/definition.rb
#initialize(name, options = {}) ⇒ Definition
Returns a new instance of Definition.
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/brief/model/definition.rb', line 14 def initialize(name, = {}) @name = name @options = @type_alias = .fetch(:type_alias) { name.downcase.parameterize.gsub(/-/, '_') } @metadata_schema = {}.to_mash @section_mappings = {}.to_mash @content_schema = { attributes: {} }.to_mash @model_class = [:model_class] @doc_options = {}.to_mash end |