Class: ShafClient::UnknownResource
- Inherits:
-
Resource
- Object
- BaseResource
- Resource
- ShafClient::UnknownResource
- Defined in:
- lib/shaf_client/unknown_resource.rb
Constant Summary
Constants included from MimeTypes
MimeTypes::DEFAULT_ADAPTER, MimeTypes::MIME_TYPE_HAL, MimeTypes::MIME_TYPE_JSON
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
Attributes inherited from BaseResource
#attributes, #curies, #embedded_resources, #links
Instance Method Summary collapse
-
#initialize(_client, payload, status = nil, headers = {}) ⇒ UnknownResource
constructor
A new instance of UnknownResource.
- #to_h ⇒ Object
Methods inherited from Resource
build, content_type, #destroy!, #get, #get_doc, #get_hal_form, #inspect, profile, #reload!
Methods inherited from BaseResource
#[], #actions, #attribute, #curie, #embedded, #inspect, #link, #rel?, #to_s
Constructor Details
#initialize(_client, payload, status = nil, headers = {}) ⇒ UnknownResource
Returns a new instance of UnknownResource.
9 10 11 12 13 14 15 16 17 |
# File 'lib/shaf_client/unknown_resource.rb', line 9 def initialize(_client, payload, status = nil, headers = {}) @body = payload.freeze @http_status = status @headers = headers @attributes = {}.freeze @links = {}.freeze @curies = {}.freeze @embedded_resources = {}.freeze end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ShafClient::BaseResource
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/shaf_client/unknown_resource.rb', line 5 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
5 6 7 |
# File 'lib/shaf_client/unknown_resource.rb', line 5 def headers @headers end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
5 6 7 |
# File 'lib/shaf_client/unknown_resource.rb', line 5 def http_status @http_status end |
Instance Method Details
#to_h ⇒ Object
19 20 21 |
# File 'lib/shaf_client/unknown_resource.rb', line 19 def to_h {} end |