class RuboCop::Server::ServerCommand::Base
Abstract base class for server command. @api private
Public Class Methods
inherited(child)
click to toggle source
Calls superclass method
# File lib/rubocop/server/server_command/base.rb, line 29 def self.inherited(child) super child.prepend Runner end
new(args, token: '', cwd: Dir.pwd)
click to toggle source
# File lib/rubocop/server/server_command/base.rb, line 34 def initialize(args, token: '', cwd: Dir.pwd) @args = args @token = token @cwd = cwd end
Public Instance Methods
run()
click to toggle source
# File lib/rubocop/server/server_command/base.rb, line 40 def run; end
Private Instance Methods
validate_token!()
click to toggle source
# File lib/rubocop/server/server_command/base.rb, line 44 def validate_token! raise InvalidTokenError unless Cache.token_path.read == @token end