Class: HTTPalooza::Players::Base Abstract
- Inherits:
-
Object
- Object
- HTTPalooza::Players::Base
- Defined in:
- lib/httpalooza/players/base.rb
Overview
This class is abstract.
Superclass for Player implementations
Direct Known Subclasses
CurbPlayer, CurlPlayer, EmHttpRequestPlayer, HTTPClientPlayer, HTTPartyPlayer, LynxPlayer, NetHTTPPlayer, PatronPlayer, RestClientPlayer, SeleniumPlayer, TelnetPlayer, TyphoeusPlayer, UnirestPlayer, UserBrowserPlayer
Class Attribute Summary collapse
-
.dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
.name ⇒ Object
readonly
Returns the value of attribute name.
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Class Method Summary collapse
- .execute!(request) ⇒ Object
-
.introducing!(name, dependencies = []) ⇒ Object
Create a new player and require any depenencies.
Instance Method Summary collapse
-
#initialize(request) ⇒ Base
constructor
A new instance of Base.
- #name ⇒ Object
- #response ⇒ Object
Constructor Details
#initialize(request) ⇒ Base
Returns a new instance of Base.
29 30 31 |
# File 'lib/httpalooza/players/base.rb', line 29 def initialize(request) @request = request end |
Class Attribute Details
.dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
7 8 9 |
# File 'lib/httpalooza/players/base.rb', line 7 def dependencies @dependencies end |
.name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/httpalooza/players/base.rb', line 7 def name @name end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
27 28 29 |
# File 'lib/httpalooza/players/base.rb', line 27 def request @request end |
Class Method Details
.execute!(request) ⇒ Object
22 23 24 |
# File 'lib/httpalooza/players/base.rb', line 22 def execute!(request) new(request).response end |
Instance Method Details
#name ⇒ Object
33 34 35 |
# File 'lib/httpalooza/players/base.rb', line 33 def name self.class.name end |
#response ⇒ Object
37 38 39 |
# File 'lib/httpalooza/players/base.rb', line 37 def response raise NotImplementedError end |