class Crossroads::Link

Public Class Methods

new(attributes = {}, content = nil, &block) click to toggle source
# File lib/crossroads/link.rb, line 5
def initialize(attributes = {}, content = nil, &block)
  @content = content
  @attributes = attributes
  @attributes[:href] ||= attributes.delete(:to)
end

Public Instance Methods

render() click to toggle source
# File lib/crossroads/link.rb, line 11
def render
  a(@attributes, @content)
end