Class: Wee::Brush::RadioButtonTag

Inherits:
InputTag show all
Defined in:
lib/wee/renderer/html/brushes.rb

Defined Under Namespace

Classes: RadioGroup

Instance Attribute Summary

Attributes inherited from Wee::Brush

#canvas, #parent

Instance Method Summary collapse

Methods inherited from GenericTagBrush

#__action_callback, #__actionurl_callback, #__actionurl_named_callback, #__input_callback, #css_class, #css_class_for, #method_missing, #onclick_callback, #onclick_update

Methods inherited from Wee::Brush

#close

Constructor Details

#initializeRadioButtonTag

Returns a new instance of RadioButtonTag.



432
433
434
435
# File 'lib/wee/renderer/html/brushes.rb', line 432

def initialize
  super
  type('radio')
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Wee::Brush::GenericTagBrush

Instance Method Details

#callback(symbol = nil, *args, &block) ⇒ Object



465
466
467
468
# File 'lib/wee/renderer/html/brushes.rb', line 465

def callback(symbol=nil, *args, &block)
  @callback = to_callback(symbol, args, block)
  self
end

#group(radio_group) ⇒ Object



460
461
462
463
# File 'lib/wee/renderer/html/brushes.rb', line 460

def group(radio_group)
  @group = radio_group
  self
end

#withObject



470
471
472
473
474
475
476
477
# File 'lib/wee/renderer/html/brushes.rb', line 470

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