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

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

#get_oid, html_attr, #oid, #onclick_callback, #onclick_javascript, #onclick_update_callback, #onclick_update_self_callback, #ondblclick_callback

Methods inherited from Wee::Brush

#close, nesting?, #setup

Constructor Details

#initializeRadioButtonTag

Returns a new instance of RadioButtonTag.



637
638
639
# File 'lib/wee/html_brushes.rb', line 637

def initialize
  super(HTML_TYPE)
end

Instance Method Details

#__callbackObject

do nothing



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

def __callback; end

#group(radio_group) ⇒ Object



641
642
643
644
# File 'lib/wee/html_brushes.rb', line 641

def group(radio_group)
  @group = radio_group
  self
end

#withObject



650
651
652
653
654
655
656
657
# File 'lib/wee/html_brushes.rb', line 650

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