Sha256: f1a161ad257f2179787e6b9c9e71e38dfb4490a5656700af85525e4d2505503a
Contents?: true
Size: 332 Bytes
Versions: 1
Compression:
Stored size: 332 Bytes
Contents
module Encore module Entity module Output module JSON # Return each exposed attribute as a JSON value def as_json(args = {}) self.class.exposed_attributes.inject({}) do |memo, item| memo.merge item.attribute => item.fetch(self) end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
encore-0.0.3 | lib/encore/entity/output/json.rb |