Class: Rackful::Serializer Abstract
- Inherits:
-
Object
- Object
- Rackful::Serializer
- Includes:
- Enumerable
- Defined in:
- gems/rackful-0.1.1/lib/rackful_serializer.rb,
gems/rackful-0.1.1.orig/lib/rackful_serializer.rb
Overview
Instance Attribute Summary (collapse)
- - (void) content_type readonly
- - (void) resource readonly
Instance Method Summary (collapse)
-
- (void) each
abstract
Every serializer must implement this method.
-
- (Serializer) initialize(resource, content_type)
constructor
A new instance of Serializer.
Constructor Details
- (Serializer) initialize(resource, content_type)
A new instance of Serializer
31 32 33 |
# File 'gems/rackful-0.1.1/lib/rackful_serializer.rb', line 31 def initialize resource, content_type @resource, @content_type = resource, content_type end |
Instance Attribute Details
- (void) content_type (readonly)
28 29 30 |
# File 'gems/rackful-0.1.1/lib/rackful_serializer.rb', line 28 def content_type @content_type end |
- (void) resource (readonly)
28 29 30 |
# File 'gems/rackful-0.1.1/lib/rackful_serializer.rb', line 28 def resource @resource end |
Instance Method Details
- (void) each
This method is abstract.
Every serializer must implement this method.
41 42 43 |
# File 'gems/rackful-0.1.1/lib/rackful_serializer.rb', line 41 def each raise HTTP500InternalServerError, "Class #{self.class} doesn't implement #each()." end |