Sha256: 35fbfae67d1e67d3aa01e851ae420beb0a94917b0445bb754572a1308fe66101

Contents?: true

Size: 203 Bytes

Versions: 12

Compression:

Stored size: 203 Bytes

Contents

module Rack
  class API
    module Formatter
      class Jsonp < Base
        def to_format
          params.fetch(:callback, "callback") + "(#{object.to_json});"
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rack-api-1.1.0 lib/rack/api/formatter/jsonp.rb
rack-api-1.0.2 lib/rack/api/formatter/jsonp.rb
rack-api-1.0.1 lib/rack/api/formatter/jsonp.rb
rack-api-1.0.0 lib/rack/api/formatter/jsonp.rb
rack-api-0.3.1 lib/rack/api/formatter/jsonp.rb
rack-api-0.3.0 lib/rack/api/formatter/jsonp.rb
rack-api-0.2.2 lib/rack/api/formatter/jsonp.rb
rack-api-0.2.1 lib/rack/api/formatter/jsonp.rb
rack-api-0.2.0 lib/rack/api/formatter/jsonp.rb
rack-api-0.1.2 lib/rack/api/formatter/jsonp.rb
rack-api-0.1.1 lib/rack/api/formatter/jsonp.rb
rack-api-0.1.0 lib/rack/api/formatter/jsonp.rb