Class: Georgia::WarningMessage
- Defined in:
- app/presenters/georgia/warning_message.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#revision ⇒ Object
readonly
Returns the value of attribute revision.
Attributes inherited from Presenter
Instance Method Summary collapse
-
#initialize(view_context, page, revision, options = {}) ⇒ WarningMessage
constructor
A new instance of WarningMessage.
- #to_s ⇒ Object
Constructor Details
#initialize(view_context, page, revision, options = {}) ⇒ WarningMessage
Returns a new instance of WarningMessage.
6 7 8 9 10 11 |
# File 'app/presenters/georgia/warning_message.rb', line 6 def initialize view_context, page, revision, ={} @page = page @revision = revision = super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Georgia::Presenter
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'app/presenters/georgia/warning_message.rb', line 4 def end |
#page ⇒ Object (readonly)
Returns the value of attribute page.
4 5 6 |
# File 'app/presenters/georgia/warning_message.rb', line 4 def page @page end |
#revision ⇒ Object (readonly)
Returns the value of attribute revision.
4 5 6 |
# File 'app/presenters/georgia/warning_message.rb', line 4 def revision @revision end |
Instance Method Details
#to_s ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/presenters/georgia/warning_message.rb', line 13 def to_s return nil unless html = ActiveSupport::SafeBuffer.new html << warning_icon_tag html << content_tag(:div, content_tag(:p, html), class: 'warning-message') end |