Module: Card::Set::TypePlusRight::User::Follow::FollowEditorHelper::HtmlFormat
- Extended by:
- AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow/follow_editor_helper.rb
Overview
TODO: these object representations are complex enough for their own class
Instance Method Summary collapse
-
#following_rules_and_options(&block) ⇒ Object
constructs hash of rules/options for “Follow” tab.
-
#ignoring_rules_and_options(&block) ⇒ Object
constructs hash of rules/options for “Ignore” tab.
Instance Method Details
#following_rules_and_options(&block) ⇒ Object
constructs hash of rules/options for “Follow” tab
14 15 16 17 18 19 |
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow/follow_editor_helper.rb', line 14 def &block rule_opt_array = .map do |key, val| [(Card.fetch key, new: {}), val] end Hash[rule_opt_array], &block end |
#ignoring_rules_and_options(&block) ⇒ Object
constructs hash of rules/options for “Ignore” tab
22 23 24 25 26 27 |
# File 'platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow/follow_editor_helper.rb', line 22 def &block rule_opts_hash = ignore_rules.each_with_object({}) do |rule, hash| hash[rule] = [:never.cardname] end rule_opts_hash, &block end |