module Whiteprint::Model

Public Class Methods

included(model) click to toggle source
Calls superclass method
# File lib/whiteprint/model.rb, line 20
def self.included(model)
  Whiteprint.models += [model]
  super
end

Public Instance Methods

inherited(base) click to toggle source
Calls superclass method
# File lib/whiteprint/model.rb, line 14
def inherited(base)
  whiteprint.clone_to(base) if whiteprint
  super
end
whiteprint(**options, &block) click to toggle source
# File lib/whiteprint/model.rb, line 6
def whiteprint(**options, &block)
  return @_whiteprint unless block

  @_whiteprint ||= ::Whiteprint.new(self, **options)
  @_whiteprint.execute(&block)
end