123456789_123456789_123456789_123456789_123456789_

Class: RuboCop::Server::ServerCommand::Base Private

Relationships & Source Files
Namespace Children
Modules:
Extension / Inclusion / Inheritance Descendants
Subclasses:
Inherits: Object
Defined in: lib/rubocop/server/server_command/base.rb

Overview

Abstract base class for server command.

Class Method Summary

Instance Method Summary

Constructor Details

.new(args, token: '', cwd: Dir.pwd) ⇒ Base

[ GitHub ]

  
# File 'lib/rubocop/server/server_command/base.rb', line 34

def initialize(args, token: '', cwd: Dir.pwd)
  @args = args
  @token = token
  @cwd = cwd
end

Class Method Details

.inherited(child)

[ GitHub ]

  
# File 'lib/rubocop/server/server_command/base.rb', line 29

def self.inherited(child)
  super
  child.prepend Runner
end

Instance Method Details

#run

[ GitHub ]

  
# File 'lib/rubocop/server/server_command/base.rb', line 40

def run; end

#validate_token! (private)

Raises:

[ GitHub ]

  
# File 'lib/rubocop/server/server_command/base.rb', line 44

def validate_token!
  raise InvalidTokenError unless Cache.token_path.read == @token
end