Class: Chatrix::Api::ApiComponent
- Inherits:
-
Object
- Object
- Chatrix::Api::ApiComponent
- Defined in:
- lib/chatrix/api/api_component.rb
Overview
Wraps a matrix instance for use in calling API endpoints.
Instance Method Summary collapse
-
#initialize(matrix) ⇒ ApiComponent
constructor
Initializes a new ApiComponent instance.
-
#make_request(*args) {|fragment| ... } ⇒ HTTParty::Response
protected
Makes an API request using the underlying Matrix instance.
Constructor Details
#initialize(matrix) ⇒ ApiComponent
Initializes a new ApiComponent instance.
10 11 12 |
# File 'lib/chatrix/api/api_component.rb', line 10 def initialize(matrix) @matrix = matrix end |
Instance Method Details
#make_request(*args) {|fragment| ... } ⇒ HTTParty::Response (protected)
Makes an API request using the underlying Matrix instance.
20 21 22 |
# File 'lib/chatrix/api/api_component.rb', line 20 def make_request(*args, &block) @matrix.make_request(*args, &block) end |