Class: Sandals::Link

Inherits:
Object
  • Object
show all
Defined in:
lib/sandals/view.rb

Constant Summary collapse

ALLOWED_SCHEMES =
%w[http https mailto].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#contentObject (readonly)

Returns the value of attribute content.



290
291
292
# File 'lib/sandals/view.rb', line 290

def content
  @content
end

#destinationObject (readonly)

Returns the value of attribute destination.



290
291
292
# File 'lib/sandals/view.rb', line 290

def destination
  @destination
end