class HS::Link
Attributes
to[RW]
Public Instance Methods
href()
click to toggle source
# File lib/hs/elements/link.rb, line 15 def href return to if to =~ %r{^http(s)?://} return to if to.start_with?('/') "/#{to}" end
params()
click to toggle source
Calls superclass method
HS::Element#params
# File lib/hs/elements/link.rb, line 11 def params super.merge(href: href) end
tag_name()
click to toggle source
# File lib/hs/elements/link.rb, line 7 def tag_name 'a' end