class Medie::Generic
This is a simple implementation of a media type that provides no links and no marshalling, except the content itself. There is no parsing.
Public Instance Methods
can_handle?(media_type)
click to toggle source
# File lib/medie/generic.rb, line 21 def can_handle?(media_type) true end
marshal(string, rel)
click to toggle source
Because there is no media type registered, return the string itself.
# File lib/medie/generic.rb, line 17 def marshal(string, rel) string end
unmarshal(content)
click to toggle source
Because there is no media type registered return the content itself
# File lib/medie/generic.rb, line 9 def unmarshal(content) def content.links [] end content end