Sha256: 5ebb82a48269b32652074867b5fb813bf31f17a665ec2b4b42fd79bdfcfb35f9

Contents?: true

Size: 648 Bytes

Versions: 4

Compression:

Stored size: 648 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Pennyworth
  module CLI
    module Actions
      module HTMX
        # Handles extension documentation action.
        class Extension < Sod::Action
          include Import[:settings, :io]

          description "Render Alfred extensions script filter."

          on "--extensions"

          def initialize(processor: Processor.for_htmx, **)
            @processor = processor
            super(**)
          end

          def call(*) = io.puts processor.call(settings.htmx_extensions_uri).to_json

          private

          attr_reader :processor
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pennyworth-17.8.0 lib/pennyworth/cli/actions/htmx/extension.rb
pennyworth-17.7.0 lib/pennyworth/cli/actions/htmx/extension.rb
pennyworth-17.6.0 lib/pennyworth/cli/actions/htmx/extension.rb
pennyworth-17.5.0 lib/pennyworth/cli/actions/htmx/extension.rb