Class: Card::Set::Pattern
- Inherits:
-
Object
- Object
- Card::Set::Pattern
- Defined in:
- lib/card/set/pattern.rb,
lib/card/set/pattern/base.rb
Defined Under Namespace
Classes: Base
Class Method Summary collapse
- .card_keys ⇒ Object
- .find(pattern_code) ⇒ Object
- .loadable_codes ⇒ Object
- .loadables ⇒ Object
- .nonbase_loadable_codes ⇒ Object
- .nonbase_loadables ⇒ Object
- .reset ⇒ Object
Class Method Details
.card_keys ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/card/set/pattern.rb', line 27 def card_keys @card_keys ||= Card.set_patterns.each_with_object({}) do |set_pattern, hash| card_key = Card.quick_fetch(set_pattern.pattern_code).key hash[card_key] = true end end |
.find(pattern_code) ⇒ Object
23 24 25 |
# File 'lib/card/set/pattern.rb', line 23 def find pattern_code Card.set_patterns.find { |sub| sub.pattern_code == pattern_code } end |
.loadable_codes ⇒ Object
41 42 43 |
# File 'lib/card/set/pattern.rb', line 41 def loadable_codes Card.set_patterns.map(&:pattern_code).push(:abstract).reverse end |
.loadables ⇒ Object
13 14 15 |
# File 'lib/card/set/pattern.rb', line 13 def loadables Card.set_patterns.push(Card::Set::Abstract).reverse end |
.nonbase_loadable_codes ⇒ Object
35 36 37 38 39 |
# File 'lib/card/set/pattern.rb', line 35 def nonbase_loadable_codes l = loadable_codes l.delete :all l end |