Class: Deja::Judges::Base
- Inherits:
-
Object
- Object
- Deja::Judges::Base
- Defined in:
- lib/deja/judges/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Class Method Summary collapse
-
.client_description ⇒ Object
Human-readable client name, used in error messages.
-
.handles?(_client) ⇒ Boolean
Does this adapter handle the given judge-client instance?.
Instance Method Summary collapse
-
#defaults ⇒ Object
Default request attrs for this judge (model, etc.).
-
#initialize(client) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(client) ⇒ Base
Returns a new instance of Base.
48 49 50 |
# File 'lib/deja/judges/base.rb', line 48 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
46 47 48 |
# File 'lib/deja/judges/base.rb', line 46 def client @client end |
Class Method Details
.client_description ⇒ Object
Human-readable client name, used in error messages.
58 59 60 |
# File 'lib/deja/judges/base.rb', line 58 def self.client_description name end |
.handles?(_client) ⇒ Boolean
Does this adapter handle the given judge-client instance?
53 54 55 |
# File 'lib/deja/judges/base.rb', line 53 def self.handles?(_client) raise NotImplementedError, "#{name} must implement .handles?" end |
Instance Method Details
#defaults ⇒ Object
Default request attrs for this judge (model, etc.). The matcher merges the user’s judge_attrs over these, then its own reserved keys over both.
64 65 66 |
# File 'lib/deja/judges/base.rb', line 64 def defaults raise NotImplementedError, "#{self.class} must implement #defaults" end |