Method: YARD::Server::Commands::Base#run

Defined in:
lib/yard/server/commands/base.rb

#runvoid

This method is abstract.

This method returns an undefined value.

Subclass this method to implement a custom command. This method should set the #status and #body, and optionally modify the #headers. Note that #status defaults to 200.

Examples:

A custom command

class ErrorCommand < Base
  def run
    self.body = 'ERROR! The System is down!'
    self.status = 500
    self.headers['Conten-Type'] = 'text/plain'
  end
end

Raises:

  • (NotImplementedError)

Since:

  • 0.6.0


122
123
124
# File 'lib/yard/server/commands/base.rb', line 122

def run
  raise NotImplementedError
end