class Lurker::ResponseCodePresenter
An BasePresenter for ResponseCodes
Attributes
response_code[R]
Public Class Methods
new(response_code, options)
click to toggle source
Calls superclass method
Lurker::BasePresenter::new
# File lib/lurker/presenters/response_code_presenter.rb, line 5 def initialize(response_code, options) super(options) @response_code = response_code end
Public Instance Methods
description()
click to toggle source
# File lib/lurker/presenters/response_code_presenter.rb, line 29 def description response_code["description"] end
status()
click to toggle source
# File lib/lurker/presenters/response_code_presenter.rb, line 25 def status response_code["status"] end
successful?()
click to toggle source
# File lib/lurker/presenters/response_code_presenter.rb, line 21 def successful? response_code["successful"] end
to_html()
click to toggle source
# File lib/lurker/presenters/response_code_presenter.rb, line 10 def to_html <<-EOS <div class="response-code"> <span class="status"> #{status} </span> #{description} </div> EOS end