Class: Serialize::Json

Inherits:
Format
  • Object
show all
Defined in:
lib/serialize/json.rb

Instance Method Summary collapse

Methods inherited from Format

#initialize

Constructor Details

This class inherits a constructor from Serialize::Format

Instance Method Details

#render(*args) ⇒ Object



5
6
7
8
9
# File 'lib/serialize/json.rb', line 5

def render(*args)
  # args are empty unless called through
  # another to_json call
  args.empty? ? content.to_json : content
end