Method: SWS::Hyperlink#prefix
- Defined in:
- lib/sws/Core/components/Hyperlink/Hyperlink.rb
#prefix ⇒ Object
Returns opening <A> tag
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/sws/Core/components/Hyperlink/Hyperlink.rb', line 24 def prefix () if ( slot_bound?( "href" ) ) #normal, href hyperlink return generate_href_link( @slots["href"].value() ) elsif ( slot_bound?( "page_name" ) ) #page for name return generate_page_link( @slots["page_name"].value() ) elsif ( slot_bound?( "action" ) ) #call method on the same component return generate_action_link() elsif ( slot_bound?( "direct_action_class" ) ) return generate_direct_action_link() end #TODO: throw exception if none found? end |