Class: Pakyow::Presenter::Attributes::String
- Extended by:
- Forwardable, Support::SafeStringHelpers
- Defined in:
- lib/pakyow/presenter/attributes/string.rb
Overview
Wraps the value for a string-type view attribute (e.g. href).
Behaves just like a normal String
.
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Attribute
#==, #initialize, #initialize_copy
Constructor Details
This class inherits a constructor from Pakyow::Presenter::Attributes::Attribute
Class Method Details
.parse(value) ⇒ Object
31 32 33 |
# File 'lib/pakyow/presenter/attributes/string.rb', line 31 def parse(value) new(ensure_html_safety(value.to_s)) end |
Instance Method Details
#to_s ⇒ Object
20 21 22 |
# File 'lib/pakyow/presenter/attributes/string.rb', line 20 def to_s @value end |
#to_str ⇒ Object
24 25 26 |
# File 'lib/pakyow/presenter/attributes/string.rb', line 24 def to_str to_s end |