Class: Crossroads::Link
- Inherits:
-
Object
- Object
- Crossroads::Link
- Includes:
- Clearwater::Component
- Defined in:
- lib/crossroads/link.rb
Instance Method Summary collapse
-
#initialize(attributes = {}, content = nil, &block) ⇒ Link
constructor
A new instance of Link.
- #render ⇒ Object
Constructor Details
#initialize(attributes = {}, content = nil, &block) ⇒ Link
Returns a new instance of Link.
5 6 7 8 9 |
# File 'lib/crossroads/link.rb', line 5 def initialize(attributes = {}, content = nil, &block) @content = content @attributes = attributes @attributes[:href] ||= attributes.delete(:to) end |
Instance Method Details
#render ⇒ Object
11 12 13 |
# File 'lib/crossroads/link.rb', line 11 def render a(@attributes, @content) end |