Class: NodeInfoController

Inherits:
ApplicationController show all
Defined in:
app/controllers/node_info_controller.rb

Instance Method Summary collapse

Instance Method Details

#documentObject


8
9
10
11
12
13
14
15
# File 'app/controllers/node_info_controller.rb', line 8

def document
  if NodeInfo.supported_version?(params[:version])
    document = NodeInfoPresenter.new(params[:version])
    render json: document, content_type: document.content_type
  else
    head :not_found
  end
end

#jrdObject


4
5
6
# File 'app/controllers/node_info_controller.rb', line 4

def jrd
  render json: NodeInfo.jrd(CGI.unescape(node_info_url("123.123").sub("123.123", "%{version}")))
end

#statisticsObject


17
18
19
20
21
22
# File 'app/controllers/node_info_controller.rb', line 17

def statistics
  respond_to do |format|
    format.json { head :not_acceptable }
    format.all { @statistics = NodeInfoPresenter.new("1.0") }
  end
end