Class: RadioLabel
- Inherits:
-
Shoes::Widget
- Object
- Shoes::Widget
- RadioLabel
- Defined in:
- lib/shoes/profiler.rb
Instance Method Summary collapse
- #checked=(bool) ⇒ Object
- #checked? ⇒ Boolean
-
#initialize(options = {}) ⇒ RadioLabel
constructor
A new instance of RadioLabel.
Constructor Details
#initialize(options = {}) ⇒ RadioLabel
Returns a new instance of RadioLabel.
135 136 137 138 139 140 141 142 143 144 |
# File 'lib/shoes/profiler.rb', line 135 def initialize(={}) label = [:text] || "" active = [:active] || false inner_margins = [:inner_margins] || [0,0,0,0] r_margins = inner_margins.dup; r_margins[2] = 5 p_margins = [0,3] + inner_margins[2..3] @r = radio checked: active, margin: r_margins @p = para label, margin: p_margins end |
Instance Method Details
#checked=(bool) ⇒ Object
147 |
# File 'lib/shoes/profiler.rb', line 147 def checked=(bool); @r.checked = bool end |
#checked? ⇒ Boolean
146 |
# File 'lib/shoes/profiler.rb', line 146 def checked?; @r.checked? end |