Sha256: 56fc773479d878064c34dbe69a422f89936501cd0ca2ae974ca32d97beebdc93

Contents?: true

Size: 920 Bytes

Versions: 1

Compression:

Stored size: 920 Bytes

Contents

# encoding: UTF-8
# frozen_string_literal: true

require 'nrser/refinements/types'
using NRSER::Types


# Namespace
# =======================================================================

module  Locd
module  CLI
module  Command


# Definitions
# =======================================================================

class RotateLogs < Job
  
  desc              "add [OPTIONS] [-- CMD_TEMPLATE...]",
                    "Add the rotate-logs agent"

  include_shared  t[  groups: t.has_any( :add, :respond_with_agents ) ]

  def add
    agent = agent_class.add **option_kwds( groups: [ :write, :add ] )

    logger.info "#{ agent_class.name } `#{ agent.label }` created."
    
    agent.reload if options[:load]
    
    respond agent
  end

end # class RotateLogs


# /Namespace
# =======================================================================

end # module  Command
end # module  CLI
end # module  Locd

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
locd-0.1.13 lib/locd/cli/command/rotate_logs/add.rb