Sha256: 0bac43be376766d214c09cbe0b5eb71f37d09e5220f0fb104bf3e7f54fc2f0f5
Contents?: true
Size: 648 Bytes
Versions: 190
Compression:
Stored size: 648 Bytes
Contents
# frozen_string_literal: true require "active_support/concern" module Primer # :nodoc: module Audited # DSL to register when a component has passed an accessibility audit. # # Example: # # class MyComponent < ViewComponent::Base # include Primer::Audited::Dsl # audited_at 'YYYY-MM-DD' # end module Dsl extend ActiveSupport::Concern included do class_attribute :audit_date, instance_writer: false end class_methods do def audited_at(date = nil) return audit_date if date.nil? self.audit_date = date end end end end end
Version data entries
190 entries across 190 versions & 2 rubygems