Class: OSDN::CLI::Command::FrsBase

Inherits:
Base
  • Object
show all
Defined in:
lib/osdn/cli/command/frs_base.rb

Direct Known Subclasses

Package, Release, Relfile

Instance Attribute Summary

Attributes inherited from Base

#credential, #format, #logger

Instance Method Summary collapse

Methods inherited from Base

#credential_path, #initialize, #load_credential, #load_variables, #set_client_token, #set_credential, #update_token, #update_variables, #write_credential, #write_variables

Constructor Details

This class inherits a constructor from OSDN::CLI::Command::Base

Instance Method Details

#process_optionsObject

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/osdn/cli/command/frs_base.rb', line 21

def process_options
  raise NotImplementedError
end

#runObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/osdn/cli/command/frs_base.rb', line 3

def run
  update_token
  process_options
  command = ARGV.shift || 'list'
  if !command || command.empty?
    logger.fatal "subcommand is missing."
    help
    return
  end
  if self.respond_to? command
    self.send command
  else
    logger.fatal "Invalid subcommand: #{command}"
    help
    return
  end
end