Sha256: 1ed10a643b29a2267d408ce192de807fcdcb346c4d518134d40f669c4a6744c7

Contents?: true

Size: 451 Bytes

Versions: 5

Compression:

Stored size: 451 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Pragmater
  module CLI
    module Actions
      # Stores pragma comments.
      class Comment < Sod::Action
        include Import[:input]

        description "Set pragma comments."

        on %w[-c --comments], argument: "[a,b,c]"

        default { Container[:configuration].comments }

        def call(comments = nil) = input.comments = Array(comments || default)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pragmater-14.6.0 lib/pragmater/cli/actions/comment.rb
pragmater-14.4.0 lib/pragmater/cli/actions/comment.rb
pragmater-14.3.0 lib/pragmater/cli/actions/comment.rb
pragmater-14.2.0 lib/pragmater/cli/actions/comment.rb
pragmater-14.1.1 lib/pragmater/cli/actions/comment.rb