Class: TelphinApi::Method
- Inherits:
-
Object
- Object
- TelphinApi::Method
- Includes:
- Resolvable
- Defined in:
- lib/telphin_api/method.rb
Overview
An API method. It is responsible for generating it's full name and determining it's type.
Constant Summary collapse
- PREDICATE_NAMES =
A pattern for names of methods with a boolean result.
/^is.*\?$/
Instance Attribute Summary
Attributes included from Resolvable
Instance Method Summary collapse
-
#call(args = {}, &block) ⇒ Object
Calling the API method.
Methods included from Resolvable
Instance Method Details
#call(args = {}, &block) ⇒ Object
Calling the API method.
It delegates the network request to API.call
and result processing to Result.process
.
12 13 14 15 |
# File 'lib/telphin_api/method.rb', line 12 def call(args = {}, &block) response = API.call(full_method, args, token) Result.process(response, type, block) end |