Class: Card::Set::Rule::RuleForm::RuleSetRadio
- Inherits:
-
Object
- Object
- Card::Set::Rule::RuleForm::RuleSetRadio
- Defined in:
- tmpsets/set/mod022-rules/rule/rule_form/rule_set_radio.rb
Instance Attribute Summary collapse
-
#format ⇒ Object
readonly
Returns the value of attribute format.
Instance Method Summary collapse
- #html(narrower) ⇒ Object
-
#initialize(format, set_name, tag, state) ⇒ RuleSetRadio
constructor
A new instance of RuleSetRadio.
Constructor Details
#initialize(format, set_name, tag, state) ⇒ RuleSetRadio
Returns a new instance of RuleSetRadio.
14 15 16 17 18 19 20 |
# File 'tmpsets/set/mod022-rules/rule/rule_form/rule_set_radio.rb', line 14 def initialize format, set_name, tag, state @format = format @card = format.card @set_name = set_name @tag = tag @state = state end |
Instance Attribute Details
#format ⇒ Object (readonly)
Returns the value of attribute format.
9 10 11 |
# File 'tmpsets/set/mod022-rules/rule/rule_form/rule_set_radio.rb', line 9 def format @format end |
Instance Method Details
#html(narrower) ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'tmpsets/set/mod022-rules/rule/rule_form/rule_set_radio.rb', line 22 def html narrower @narrower_rules = narrower rule_radio do radio_text = "#{@set_name}+#{@tag}" :name, radio_text, checked: checked?, warning: warning end end |