Class: ToNetMeApi::Method
- Inherits:
-
Object
- Object
- ToNetMeApi::Method
- Includes:
- Resolvable
- Defined in:
- lib/to_net_me_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 16 17 |
# File 'lib/to_net_me_api/method.rb', line 12 def call(args = {}, &block) # raise full_name.inspect response = API.call(full_name, args, auth_key) # когда ответ бует стандартизирован тогда нужно будет делать вывод результата иобработку ошибок Result.process(response, type, block) end |