lib/fdoc/presenters/response_code_presenter.rb in fdoc-0.3.0 vs lib/fdoc/presenters/response_code_presenter.rb in fdoc-0.3.1

- old
+ new

@@ -1,7 +1,7 @@ -# An HtmlPresenter for ResponseCodes -class Fdoc::ResponseCodePresenter < Fdoc::HtmlPresenter +# An BasePresenter for ResponseCodes +class Fdoc::ResponseCodePresenter < Fdoc::BasePresenter attr_reader :response_code def initialize(response_code, options) super(options) @response_code = response_code @@ -16,17 +16,26 @@ #{description} </div> EOS end + def to_markdown + "__#{status}__: #{description_raw}" + end + def successful? response_code["successful"] end def status response_code["status"] end def description - render_markdown(response_code["description"]) + render_markdown(description_raw) end -end \ No newline at end of file + + def description_raw + response_code["description"] + end + +end