Class: Card::Set::Star

Inherits:
Pattern::Base show all
Extended by:
Pattern::Helper
Defined in:
card/tmpsets/set_pattern/103-star.rb

Overview

Set Pattern: Star

Instance Attribute Summary

Attributes included from Pattern::ClassMethods

#anchor_parts_count, #anchorless, #assigns_type, #junction_only, #pattern_code, #pattern_id

Class Method Summary collapse

Methods inherited from Pattern::Base

#anchor_codenames, #anchor_parts, #anchor_parts_count, #find_anchor_id, #format_module_list, #initialize, #inspect, #lookup_module_list, #module_key, #module_list, #pattern, #rule_set_key, #safe_key, #to_s

Methods included from Pattern::ClassMethods

#anchorless?, #generic_label, #junction_only?, #module_key, #new, #pattern, #pattern_applies?, #register

Constructor Details

This class inherits a constructor from Card::Set::Pattern::Base

Class Method Details

.label(_name) ⇒ Object



8
9
10
# File 'card/tmpsets/set_pattern/103-star.rb', line 8

def label _name
  'All "*" cards'
end

.pattern_applies?(card) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'card/tmpsets/set_pattern/103-star.rb', line 20

def pattern_applies? card
  card.name.star?
end

.prototype_args(_anchor) ⇒ Object



16
17
18
# File 'card/tmpsets/set_pattern/103-star.rb', line 16

def prototype_args _anchor
  { name: "*dummy" }
end

.short_label(_name) ⇒ Object



12
13
14
# File 'card/tmpsets/set_pattern/103-star.rb', line 12

def short_label _name
  'all "*" cards'
end