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.
292 293 294 295 296 |
# File 'lib/sandals/view.rb', line 292 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.
290 291 292 |
# File 'lib/sandals/view.rb', line 290 def content @content end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
290 291 292 |
# File 'lib/sandals/view.rb', line 290 def destination @destination end |