Class: Exchanger::Operation
- Inherits:
-
Object
- Object
- Exchanger::Operation
- Defined in:
- lib/exchanger/operation.rb
Overview
Abstract class for operations.
Exchange Web Services provides many operations that enable you to access information from the Exchanger store.
Direct Known Subclasses
CreateItem, DeleteItem, ExpandDL, FindFolder, FindItem, GetFolder, GetItem, ResolveNames, UpdateItem
Defined Under Namespace
Classes: Request, Response, ResponseError
Instance Attribute Summary (collapse)
-
- (Object) options
readonly
Returns the value of attribute options.
-
- (Object) request
readonly
Returns the value of attribute request.
-
- (Object) response
readonly
Returns the value of attribute response.
Class Method Summary (collapse)
-
+ (Object) run(options = {})
Shortcut for initialize and run.
Instance Method Summary (collapse)
-
- (Operation) initialize(options = {})
constructor
A new instance of Operation.
-
- (Object) run
Returns response.
Constructor Details
- (Operation) initialize(options = {})
A new instance of Operation
11 12 13 |
# File 'lib/exchanger/operation.rb', line 11 def initialize( = {}) @options = end |
Instance Attribute Details
- (Object) options (readonly)
Returns the value of attribute options
9 10 11 |
# File 'lib/exchanger/operation.rb', line 9 def @options end |
- (Object) request (readonly)
Returns the value of attribute request
9 10 11 |
# File 'lib/exchanger/operation.rb', line 9 def request @request end |
- (Object) response (readonly)
Returns the value of attribute response
9 10 11 |
# File 'lib/exchanger/operation.rb', line 9 def response @response end |
Class Method Details
+ (Object) run(options = {})
Shortcut for initialize and run.
16 17 18 19 |
# File 'lib/exchanger/operation.rb', line 16 def self.run( = {}) operation = self.new() operation.run end |
Instance Method Details
- (Object) run
Returns response
22 23 24 25 26 27 |
# File 'lib/exchanger/operation.rb', line 22 def run @request = self.class::Request.new() @response = self.class::Response.new( Exchanger::Client.new.request(@request.body, @request.headers) ) end |