class Shul::Shule::Radiogroup
Public Class Methods
new(name='radiogroup', attributes: nil, rexle: nil)
click to toggle source
Calls superclass method
Shul::Shule::Box::new
# File lib/shul.rb, line 175 def initialize(name='radiogroup', attributes: nil, rexle: nil) h = {value: ''} h.merge!(attributes) if attributes super(name, attributes: VisualAttributes.new(h), rexle: rexle) end
Public Instance Methods
append_item(label, value)
click to toggle source
# File lib/shul.rb, line 182 def append_item(label, value) self.add @rexle.create_element('radio', label: label, value: value) end
radio(index)
click to toggle source
# File lib/shul.rb, line 188 def radio(index) if index <= self.elements.length then self.elements[index] end end