Class: Vero::Api::Base
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(context) ⇒ Base
constructor
A new instance of Base.
- #run_api(api_klass, options) ⇒ Object
Constructor Details
#initialize(context) ⇒ Base
6 7 8 |
# File 'lib/vero/api.rb', line 6 def initialize(context) self.context = context end |
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
4 5 6 |
# File 'lib/vero/api.rb', line 4 def context @context end |
Instance Method Details
#config ⇒ Object
10 11 12 |
# File 'lib/vero/api.rb', line 10 def config self.context.config end |
#run_api(api_klass, options) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/vero/api.rb', line 14 def run_api(api_klass, ) return if config.disabled validate_configured! .merge!(config.request_params) Vero::Sender.send(api_klass, config.async, config.domain, ) end |