Sha256: 9897ce7e148edc32b90a9f0e347d8d8de6eb4761fd3e2cb1fe4f7337ae514268

Contents?: true

Size: 425 Bytes

Versions: 1

Compression:

Stored size: 425 Bytes

Contents

module Daimon
  module Exhibition
    module Inquiry
      def acts_as_inquiry(to: , via: nil)
        extend Writier

        via ||= "#{to}_ids"
        exhibits_writers[to] = via.to_sym
      end

      module Writier
        def exhibit_writer_for(type)
          exhibits_writers[type]
        end

        private

        def exhibits_writers
          @exhibits_writers ||= {}
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
daimon-exhibition-0.1.0 app/models/concerns/daimon/exhibition/inquiry.rb