Class: HyperResource::Adapter
- Inherits:
-
Object
- Object
- HyperResource::Adapter
- Defined in:
- lib/hyper_resource/adapter.rb,
lib/hyper_resource/adapter/hal_json.rb
Direct Known Subclasses
Defined Under Namespace
Classes: HAL_JSON
Class Method Summary collapse
-
.apply(object, resource, opts = {}) ⇒ Object
Apply a response object (generally parsed JSON or XML) to the given HyperResource object.
-
.deserialize(string) ⇒ Object
Deserialize a string into an object.
-
.serialize(object) ⇒ Object
Serialize the object into a string.
Class Method Details
.apply(object, resource, opts = {}) ⇒ Object
Apply a response object (generally parsed JSON or XML) to the given HyperResource object. Returns the updated resource.
19 20 21 22 |
# File 'lib/hyper_resource/adapter.rb', line 19 def apply(object, resource, opts={}) raise NotImplementedError, "This is an abstract method -- subclasses "+ "of HyperResource::Adapter must implement it." end |
.deserialize(string) ⇒ Object
Deserialize a string into an object.
12 13 14 15 |
# File 'lib/hyper_resource/adapter.rb', line 12 def deserialize(string) raise NotImplementedError, "This is an abstract method -- subclasses "+ "of HyperResource::Adapter must implement it." end |
.serialize(object) ⇒ Object
Serialize the object into a string.
6 7 8 9 |
# File 'lib/hyper_resource/adapter.rb', line 6 def serialize(object) raise NotImplementedError, "This is an abstract method -- subclasses "+ "of HyperResource::Adapter must implement it." end |