Class: Shoehorn::Components::Label
- Defined in:
- lib/shoehorn/components/label.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(message, options = {}) ⇒ Label
constructor
A new instance of Label.
- #to_s ⇒ Object
Constructor Details
#initialize(message, options = {}) ⇒ Label
Returns a new instance of Label.
5 6 7 8 |
# File 'lib/shoehorn/components/label.rb', line 5 def initialize(, = {}) super @message = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/shoehorn/components/label.rb', line 3 def @message end |
Instance Method Details
#to_s ⇒ Object
10 11 12 13 |
# File 'lib/shoehorn/components/label.rb', line 10 def to_s output_buffer << content_tag(:span, , ).html_safe super end |