def value=(value)
      if value != self.value
        button = @buttons.find { |b| b.value == value }
        @selected.uncheck if @selected and @selected.checked?
        @selected = button
        @selected.check if @selected and not @selected.checked?
        publish :changed, self.value
      end

      value
    end
def value=(value)
      if value != self.value
        button = @buttons.find { |b| b.value == value }
        @selected.uncheck if @selected and @selected.checked?
        @selected = button
        @selected.check if @selected and not @selected.checked?
        publish :changed, self.value
      end

      value
    end
@example
   @my_group = group do
     horizontal do
       radio_button(1, text: '1', checked: true)
       radio_button(2, text: '2')
     end
    end

   # later
   @my_group.value = 2