Sha256: 59f2b8f4bebab8f2fb4aa081e5194afb7214e74284fafaa92b481c531d6ddb9a

Contents?: true

Size: 377 Bytes

Versions: 6

Compression:

Stored size: 377 Bytes

Contents

# frozen_string_literal: true

require "forwardable"

module Pennyworth
  module Presenters
    # Shapes a htmx record for serialization.
    class HTMX
      extend Forwardable

      delegate %i[label description uri] => :record

      def initialize record
        @record = record
      end

      alias id label

      private

      attr_reader :record
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pennyworth-17.8.0 lib/pennyworth/presenters/htmx.rb
pennyworth-17.7.0 lib/pennyworth/presenters/htmx.rb
pennyworth-17.6.0 lib/pennyworth/presenters/htmx.rb
pennyworth-17.5.0 lib/pennyworth/presenters/htmx.rb
pennyworth-17.4.1 lib/pennyworth/presenters/htmx.rb
pennyworth-17.4.0 lib/pennyworth/presenters/htmx.rb