Class: Sandals::Link
- Inherits:
-
Object
- Object
- Sandals::Link
- Defined in:
- lib/sandals/view.rb
Constant Summary collapse
- ALLOWED_SCHEMES =
%w[http https mailto].freeze
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
Instance Method Summary collapse
-
#initialize(content, to:) ⇒ Link
constructor
A new instance of Link.
Constructor Details
#initialize(content, to:) ⇒ Link
Returns a new instance of Link.
270 271 272 273 274 |
# File 'lib/sandals/view.rb', line 270 def initialize(content, to:) @content = content.to_s @destination = to.to_s validate_destination end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
268 269 270 |
# File 'lib/sandals/view.rb', line 268 def content @content end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
268 269 270 |
# File 'lib/sandals/view.rb', line 268 def destination @destination end |