Module: Card::Set::Type::SearchType::JsonFormat
- Extended by:
- AbstractFormat
- Defined in:
- tmpsets/set/mod020-search/type/search_type.rb
Instance Method Summary collapse
- #items_for_export ⇒ Object
-
#unexportable_tag?(tag_key) ⇒ Boolean
avoid running the search from +*options (huge results) and +*structure (errors) TODO: make this configurable in set mods.
Instance Method Details
#items_for_export ⇒ Object
31 32 33 34 |
# File 'tmpsets/set/mod020-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 +*options (huge results) and +*structure (errors) TODO: make this configurable in set mods
38 39 40 |
# File 'tmpsets/set/mod020-search/type/search_type.rb', line 38 def unexportable_tag? tag_key %i[options structure].map { |code| code.cardname.key }.include? tag_key end |