Module: Endpoints::Uuids::Response

Defined in:
app/api/endpoints/uuids.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.each {|object.to_json| ... } ⇒ Object

Yields:

  • (object.to_json)

20
21
22
# File 'app/api/endpoints/uuids.rb', line 20

def @owner.each
  yield(object.to_json)
end

Instance Method Details

#multiple_choicesObject


14
15
16
17
# File 'app/api/endpoints/uuids.rb', line 14

def multiple_choices
  @owner.request.service.status(300)
  render_body_json_directly
end

#redirect_to(path) ⇒ Object


8
9
10
11
12
# File 'app/api/endpoints/uuids.rb', line 8

def redirect_to(path)
  @owner.request.service.status(301)
  @owner.request.service.headers('Location' => path)
  render_body_json_directly
end