- Included in:
- Defined in:
Cards never have more than two “parts” (left and right), but they can have many “pieces”. A card’s pieces are all the other cards whose existence its existence implies. For example if A+B+C exists, that implies that A, B, C, and A+B do too.
Instance Method Summary collapse
#pieces ⇒ Object
self and all ancestors (= parts and recursive lefts).
Instance Method Details
self and all ancestors (= parts and recursive lefts)
10 11 12
# File 'cardname/lib/cardname/pieces.rb', line 10 def pieces @pieces ||= simple? ? [self] : (parts + junction_pieces) end