Class: Wee::Brush::AnchorTag

Inherits:
GenericTagBrush show all
Includes:
CallbackMixin
Defined in:
lib/wee/html_brushes.rb

Constant Summary collapse

HTML_TAG =
'a'.freeze

Constants inherited from GenericTagBrush

GenericTagBrush::EVENTS

Instance Attribute Summary

Attributes inherited from Wee::Brush

#canvas, #document

Instance Method Summary collapse

Methods included from CallbackMixin

#call, #callback, #callback_method

Methods inherited from GenericTagBrush

#callback_on, #get_oid, html_attr, #javascript_on, #oid, #onclick_callback, #onclick_javascript, #ondblclick_callback, #update_component_on, #update_on, #with

Methods inherited from Wee::Brush

#close, nesting?, #setup, #with

Constructor Details

#initializeAnchorTag

Returns a new instance of AnchorTag.



729
730
731
732
# File 'lib/wee/html_brushes.rb', line 729

def initialize
  super(HTML_TAG)
  href('#')
end

Instance Method Details

#__callbackObject



741
742
743
# File 'lib/wee/html_brushes.rb', line 741

def __callback
  url(@canvas.url_for_callback(@callback, :action, @info ? {:info => @info} : {}))
end

#info(info = nil) ⇒ Object



734
735
736
737
# File 'lib/wee/html_brushes.rb', line 734

def info(info=nil)
  @info = info
  self
end