Class: Ptero::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/ptero/cli.rb

Overview

The superclass of all Ptero command-line interfaces

Direct Known Subclasses

Root

Defined Under Namespace

Classes: Root

Class Method Summary collapse

Class Method Details

.const_missing(const_name) ⇒ Object

autoload and return any cli that is missing

Parameters:

  • const_name (Symbol)

    the name of the constant to be found



25
26
27
28
29
30
31
# File 'lib/ptero/cli.rb', line 25

def const_missing(const_name)
  # Load the cli
  require "#{__dir__}/cli/#{const_name.downcase}.rb"
  return const_get const_name
rescue LoadError
  super
end