Sha256: 42e286c9070775d754abeabda0171632dcc3cbbc38fd94338cb4ab5b1557da00

Contents?: true

Size: 584 Bytes

Versions: 10

Compression:

Stored size: 584 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Milestoner
  module CLI
    module Actions
      module Cache
        # Handles cache information.
        class Info < Sod::Action
          include Import[:kernel, :logger, client: :cache]

          description "Show information."

          on %w[-i --info]

          def call(*)
            path = client.path
            path.exist? ? log_info("Path: #{path}.") : log_info("No cache found.")
          end

          private

          def log_info(message) = logger.info { message }
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
milestoner-17.11.0 lib/milestoner/cli/actions/cache/info.rb
milestoner-17.10.0 lib/milestoner/cli/actions/cache/info.rb
milestoner-17.9.0 lib/milestoner/cli/actions/cache/info.rb
milestoner-17.6.0 lib/milestoner/cli/actions/cache/info.rb
milestoner-17.5.0 lib/milestoner/cli/actions/cache/info.rb
milestoner-17.4.0 lib/milestoner/cli/actions/cache/info.rb
milestoner-17.3.0 lib/milestoner/cli/actions/cache/info.rb
milestoner-17.2.0 lib/milestoner/cli/actions/cache/info.rb
milestoner-17.1.0 lib/milestoner/cli/actions/cache/info.rb
milestoner-17.0.0 lib/milestoner/cli/actions/cache/info.rb