Module: InquiryAttrs::Concern

Extended by:
ActiveSupport::Concern
Defined in:
lib/inquiry_attrs/concern.rb

Overview

ActiveSupport::Concern that adds the .inquirer macro to any class.

For ActiveRecord models this is automatically included via ActiveSupport.on_load(:active_record) — no explicit include needed:

class User < ApplicationRecord
inquirer :status, :role
end

For StoreModel, plain Ruby, or any other class, include it manually:

class Address
include StoreModel::Model
include InquiryAttrs::Concern

attribute :kind, :string
inquirer  :kind
end