Class: Clerk::Resources::SingularResource
- Inherits:
-
Object
- Object
- Clerk::Resources::SingularResource
- Defined in:
- lib/clerk/resources/singular_resource.rb
Instance Method Summary collapse
-
#initialize(client, resource_path) ⇒ SingularResource
constructor
A new instance of SingularResource.
- #update(changes = {}) ⇒ Object
Constructor Details
#initialize(client, resource_path) ⇒ SingularResource
Returns a new instance of SingularResource.
4 5 6 7 |
# File 'lib/clerk/resources/singular_resource.rb', line 4 def initialize(client, resource_path) @client = client @resource_path = resource_path end |
Instance Method Details
#update(changes = {}) ⇒ Object
9 10 11 |
# File 'lib/clerk/resources/singular_resource.rb', line 9 def update(changes = {}) @client.request(:patch, @resource_path, body: changes) end |