Class: Fdoc::ResponseCodePresenter
Overview
An HtmlPresenter for ResponseCodes
Instance Attribute Summary collapse
#options
Instance Method Summary
collapse
#css_path, #html_directory, #index_path, #render_erb, #render_json, #render_markdown, #tag_with_anchor
Constructor Details
5
6
7
8
|
# File 'lib/fdoc/presenters/response_code_presenter.rb', line 5
def initialize(response_code, options)
super(options)
@response_code = response_code
end
|
Instance Attribute Details
#response_code ⇒ Object
Returns the value of attribute response_code.
3
4
5
|
# File 'lib/fdoc/presenters/response_code_presenter.rb', line 3
def response_code
@response_code
end
|
Instance Method Details
#description ⇒ Object
29
30
31
|
# File 'lib/fdoc/presenters/response_code_presenter.rb', line 29
def description
render_markdown(response_code["description"])
end
|
#status ⇒ Object
25
26
27
|
# File 'lib/fdoc/presenters/response_code_presenter.rb', line 25
def status
response_code["status"]
end
|
#successful? ⇒ Boolean
21
22
23
|
# File 'lib/fdoc/presenters/response_code_presenter.rb', line 21
def successful?
response_code["successful"]
end
|
#to_html ⇒ Object
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/fdoc/presenters/response_code_presenter.rb', line 10
def to_html
" <div class=\"response-code\">\n <span class=\"status\">\n \#{status}\n </span>\n \#{description}\n </div>\n EOS\nend\n"
|