Class: Rack::API::Formatter::Jsonp
- Defined in:
- lib/rack/api/formatter/jsonp.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Rack::API::Formatter::Base
Instance Method Details
#to_format ⇒ Object
5 6 7 |
# File 'lib/rack/api/formatter/jsonp.rb', line 5 def to_format params.fetch(:callback, "callback") + "(#{object.to_json});" end |