Module: Musashi::Resource::Format

Included in:
JSON
Defined in:
lib/musashi/resource.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.formatsObject



5
6
7
# File 'lib/musashi/resource.rb', line 5

def self.formats
  @@formats ||= {}
end

Instance Method Details

#retrieveObject



9
10
11
12
13
14
# File 'lib/musashi/resource.rb', line 9

def retrieve
  marshalled = super
  resource_type = Format.formats[format]
  marshalled.extend(resource_type) unless resource_type.nil?
  marshalled
end