Class: Commerce::BaseController
- Inherits:
-
Object
- Object
- Commerce::BaseController
- Defined in:
- lib/commerce/base_controller.rb
Constant Summary collapse
- @@http_client =
FaradayClient.new(60)
- @@global_headers =
{ 'user-agent' => 'Commerce.ruby/v1' }
Instance Attribute Summary collapse
-
#http_call_back ⇒ Object
Returns the value of attribute http_call_back.
-
#http_client ⇒ Object
Returns the value of attribute http_client.
Instance Method Summary collapse
-
#initialize(http_client: nil, http_call_back: nil) ⇒ BaseController
constructor
A new instance of BaseController.
Constructor Details
#initialize(http_client: nil, http_call_back: nil) ⇒ BaseController
Returns a new instance of BaseController.
13 14 15 16 |
# File 'lib/commerce/base_controller.rb', line 13 def initialize(http_client: nil, http_call_back: nil) @http_client = http_client ||= @@http_client @http_call_back = http_call_back end |
Instance Attribute Details
#http_call_back ⇒ Object
Returns the value of attribute http_call_back.
5 6 7 |
# File 'lib/commerce/base_controller.rb', line 5 def http_call_back @http_call_back end |
#http_client ⇒ Object
Returns the value of attribute http_client.
5 6 7 |
# File 'lib/commerce/base_controller.rb', line 5 def http_client @http_client end |