Class: DnsMadeEasy::CLI::Commands::LegacyOperation

Inherits:
Base
  • Object
show all
Defined in:
lib/dnsmadeeasy/cli/commands/legacy_operation.rb

Overview

Provides a migration hint for pre-1.0 root-level API operations.

Constant Summary

Constants inherited from Base

Base::DEFAULT_CREDENTIAL_PATHS, Base::SUPPORTED_FORMATS

Constants included from MessageHelpers

MessageHelpers::BOX_OPTIONS

Instance Method Summary collapse

Methods included from MessageHelpers

error, included, info, print_box, success, warn

Constructor Details

#initialize(operation_name) ⇒ LegacyOperation

Returns a new instance of LegacyOperation.



14
15
16
17
# File 'lib/dnsmadeeasy/cli/commands/legacy_operation.rb', line 14

def initialize(operation_name)
  super()
  @operation_name = operation_name
end

Instance Method Details

#callObject

Raises:

  • (ArgumentError)


19
20
21
22
# File 'lib/dnsmadeeasy/cli/commands/legacy_operation.rb', line 19

def call(**)
  warn "Use `dme account #{@operation_name}` for this API operation."
  raise ArgumentError, "legacy root operation #{@operation_name.inspect} moved under account"
end