Module: Card::Set::Type::SearchType::JsonFormat

Extended by:
AbstractFormat
Defined in:
card/tmpsets/set/mod035-card-mod-search/type/search_type.rb,
card/tmpsets/set/mod036-card-mod-search/type/search_type.rb

Instance Method Summary collapse

Instance Method Details

#items_for_exportObject



31
32
33
34
# File 'card/tmpsets/set/mod035-card-mod-search/type/search_type.rb', line 31

def items_for_export
  return [] if card.content.empty? || unexportable_tag?(card.name.tag_name.key)
  card.item_cards
end

#unexportable_tag?(tag_key) ⇒ Boolean

avoid running the search from +:content_options (huge results) and +:structure (errors) TODO: make this configurable in set mods

Returns:

  • (Boolean)


39
40
41
# File 'card/tmpsets/set/mod035-card-mod-search/type/search_type.rb', line 39

def unexportable_tag? tag_key
  %i[content_options structure].map { |code| code.cardname.key }.include? tag_key
end