Class: Wee::Brush::RadioButtonTag

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

Constant Summary collapse

HTML_TYPE =
'radio'.freeze

Constants inherited from InputTag

InputTag::HTML_TAG

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 GenericSingleTagBrush

nesting?

Methods inherited from GenericTagBrush

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

Methods inherited from Wee::Brush

#close, nesting?, #setup

Constructor Details

#initializeRadioButtonTag

Returns a new instance of RadioButtonTag.



684
685
686
# File 'lib/wee/html_brushes.rb', line 684

def initialize
  super(HTML_TYPE)
end

Instance Method Details

#__callbackObject

do nothing



695
# File 'lib/wee/html_brushes.rb', line 695

def __callback; end

#group(radio_group) ⇒ Object



688
689
690
691
# File 'lib/wee/html_brushes.rb', line 688

def group(radio_group)
  @group = radio_group
  self
end

#withObject



697
698
699
700
701
702
703
704
# File 'lib/wee/html_brushes.rb', line 697

def with
  if @group
    n, v = @group.add_callback(@callback)
    name(n)
    value(v)
  end
  super
end