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
- .inherited(child) Internal use only
- .new(args, token: '', cwd: Dir.pwd) ⇒ Base constructor Internal use only
Instance Method Summary
- #run Internal use only
- #validate_token! private Internal use only
Constructor Details
.new(args, token: '', cwd: Dir.pwd) ⇒ Base
# 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)
# File 'lib/rubocop/server/server_command/base.rb', line 44
def validate_token! raise InvalidTokenError unless Cache.token_path.read == @token end