Sha256: d30b6f297afca3e7c17d2d34f72180ed699d7f0b138e05824e55cb3bc1921f79
Contents?: true
Size: 1.33 KB
Versions: 6
Compression:
Stored size: 1.33 KB
Contents
# -*- encoding : utf-8 -*- class Card; module Set; class All; module Bridge; # Set: All cards (Bridge, TabVisibility) # module TabVisibility; extend Card::Set def self.source_location; "/Users/ethan/dev/decko/gem/card-mod-edit/set/all/bridge/tab_visibility.rb"; end module HtmlFormat; module_parent.send :register_set_format, Card::Format::HtmlFormat, self; extend Card::Set::AbstractFormat def visible_bridge_tabs Bridge::BRIDGE_TABS.select do |_title, view| send "show_#{view}?" end end private def show_engage_tab? return unless card.real? show_follow? || show_discussion? end def show_account_tab? false end def show_history_tab? card.real? end def show_related_tab? card.real? end def show_rules_tab? true end def show_guide_tab? guide.present? end def show_discussion? d_card = discussion_card return unless d_card permission_task = d_card.new_card? ? :update : :read d_card.ok? permission_task end def discussion_card? card.junction? && card.name.tag_name.key == :discussion.cardname.key end def discussion_card return if card.new_card? || discussion_card? card.fetch :discussion, skip_modules: true, new: {} end end end;end;end;end;end; # ~~ generated from /Users/ethan/dev/decko/gem/card-mod-edit/set/all/bridge/tab_visibility.rb ~~
Version data entries
6 entries across 6 versions & 1 rubygems