Class: WialonApi::Method
- Inherits:
-
Object
- Object
- WialonApi::Method
- Includes:
- Resolvable
- Defined in:
- lib/wialon_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/wialon_api/method.rb', line 12 def call(args = {}, &block) response = Api.call(full_name, args, sid) Result.process(response, block) end |