vendor/bundle/ruby/2.2.0/gems/grape-0.7.0/lib/grape/endpoint.rb
# Allows you to define the response body as something other than the
# return value.
#
# @example
#   get '/body' do
#     body "Body"
#     "Not the Body"
#   end
#
#   GET /body # => "Body"
Allows you to define the response body as something other than the
return value.
Allows you to define the response body as something other than the return value .
def body(value = nil)
      if value
        @body = value
      else
        @body
      end
    end
def body ( value = nil ) if value @body = value else @body end end
Allows you to define the response body as something other than the
return value.
Allows you to define the response body as something other than the return value .
value
example
get '/body' do body "Body" "Not the Body" end GET /body # => "Body"
get ' / body ' do body " Body " " Not the Body " end GET / body # = > " Body "