Module: Card::Set::Type::Setting::HtmlFormat
- Extended by:
- AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod010-rules/type/setting.rb
Instance Method Summary collapse
-
#rule_link(rule, text) ⇒ Object
-
#view: core ⇒ Object
-
#view: one_line_content ⇒ Object
-
#view: rule_help ⇒ Object
Because +*help content renders in “template” mode when you render its content directly, we render the help text in the context of the *all+
card.
Instance Method Details
#rule_link(rule, text) ⇒ Object
41 42 43 44 |
# File 'platypus/tmp/set/gem-defaults/mod010-rules/type/setting.rb', line 41 def rule_link rule, text link_to_card rule, text, path: { view: :modal_rule }, slotter: true, "data-modal-class": "modal-lg" end |
#view: core ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'platypus/tmp/set/gem-defaults/mod010-rules/type/setting.rb', line 46 view :core do haml do <<-'HAML'.strip_heredoc = _render_rule_help %h3 All #{card.name.tr "*", ""} rules that apply to - card.set_classes_with_rules.each do |klass, rules| %p %h5 = klass.generic_label.downcase - if klass.anchorless? = nest rules.first, view: :bar, show: :full_name - else - rules.each do |rule| = nest rule, view: :bar HAML end end |
#view: one_line_content ⇒ Object
70 71 72 |
# File 'platypus/tmp/set/gem-defaults/mod010-rules/type/setting.rb', line 70 view :one_line_content do render_rule_help end |
#view: rule_help ⇒ Object
Because +*help content renders in “template” mode when you render its content
directly, we render the help text in the context of the *all+
66 67 68 |
# File 'platypus/tmp/set/gem-defaults/mod010-rules/type/setting.rb', line 66 view :rule_help do nest [:all, card.name], view: :rule_help end |