Sha256: 63f8c964f60562d84c641cbe3c3a0b7023d9c41495bc1e83bad102043ec07f35

Contents?: true

Size: 445 Bytes

Versions: 6

Compression:

Stored size: 445 Bytes

Contents

# frozen_string_literal: true

require "sod"

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

        description "Set pragma comments."

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

        default { Container[:settings].comments }

        def call(comments = default) = settings.comments = Array(comments)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pragmater-15.7.0 lib/pragmater/cli/actions/comment.rb
pragmater-15.6.0 lib/pragmater/cli/actions/comment.rb
pragmater-15.5.0 lib/pragmater/cli/actions/comment.rb
pragmater-15.4.0 lib/pragmater/cli/actions/comment.rb
pragmater-15.3.0 lib/pragmater/cli/actions/comment.rb
pragmater-15.2.0 lib/pragmater/cli/actions/comment.rb