Class: Card::Set::Rule::RuleForm::RuleSetRadio
- Defined in:
- platypus/tmp/set/gem-defaults/mod010-rules/rule/rule_form/rule_set_radio.rb
Overview
handles special radios for choosing set to which a rule applies
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.
17 18 19 20 21 22 23 24 |
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/rule_form/rule_set_radio.rb', line 17 def initialize format, set_name, tag, state @format = format @card = format.card @set_name = set_name @tag = tag @state = state @id = "#{unique_id}-#{Time.now.to_i}" end |
Instance Attribute Details
#format ⇒ Object (readonly)
Returns the value of attribute format.
11 12 13 |
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/rule_form/rule_set_radio.rb', line 11 def format @format end |
Instance Method Details
#html(narrower) ⇒ Object
26 27 28 29 30 31 32 |
# File 'platypus/tmp/set/gem-defaults/mod010-rules/rule/rule_form/rule_set_radio.rb', line 26 def html narrower @narrower_rules = narrower wrap_with :div, class: "form-check" do [radio, label] end end |