Class: Card::Set::Pattern
- Inherits:
-
Object
- Object
- Card::Set::Pattern
- Defined in:
- lib/card/set_pattern.rb
Defined Under Namespace
Classes: Abstract
Class Method Summary collapse
Class Method Details
.card_keys ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/card/set_pattern.rb', line 9 def card_keys @card_keys ||= Card.set_patterns.inject({}) do |hash, set_pattern| card_key = Card.quick_fetch(set_pattern.pattern_code).key hash[card_key] = true hash end end |
.find(pattern_code) ⇒ Object
5 6 7 |
# File 'lib/card/set_pattern.rb', line 5 def find pattern_code Card.set_patterns.find { |sub| sub.pattern_code == pattern_code } end |
.in_load_order ⇒ Object
18 19 20 21 |
# File 'lib/card/set_pattern.rb', line 18 def in_load_order @in_load_order ||= Card.set_patterns.reverse.map(&:pattern_code).unshift :abstract end |