Class: Shul::Shule::Radio

Inherits:
Component show all
Defined in:
lib/shul.rb

Instance Method Summary collapse

Methods inherited from Box

#append_child, #deep_clone, #obj, #obj=, #remove

Constructor Details

#initialize(name = 'radio', attributes: nil, rexle: nil) ⇒ Radio

Returns a new instance of Radio.



202
203
204
205
206
207
# File 'lib/shul.rb', line 202

def initialize(name='radio', attributes: nil, rexle: nil)

  h = {label: '', value: ''}
  h.merge!(attributes) if attributes
  super(name, attributes: VisualAttributes.new(h), rexle: rexle)
end

Instance Method Details

#checkedObject



209
210
211
212
213
# File 'lib/shul.rb', line 209

def checked

  self.obj.contents[0].checked = true

end

#uncheckedObject



215
216
217
218
219
220
221
222
# File 'lib/shul.rb', line 215

def unchecked

  # unchecking an item programatically doesn't seem to 
  # be possible in green_shoes
  
  self.obj.contents[0].checked = false

end