Class: Card::Format::JsonFormat
- Inherits:
-
DataFormat
- Object
- Card::Format
- DataFormat
- Card::Format::JsonFormat
- Defined in:
- lib/card/format/json_format.rb
Instance Method Summary collapse
Instance Method Details
#expand_stubs(content) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/card/format/json_format.rb', line 12 def content case content when Hash content.each { |k, v| content[k] = v } when Array content.map { |item| item } else super end end |
#mime_type ⇒ Object
8 9 10 |
# File 'lib/card/format/json_format.rb', line 8 def mime_type "text/json" end |