Class: Card::Set::TypePlusRight
- Inherits:
-
Pattern::Abstract
- Object
- Pattern::Abstract
- Card::Set::TypePlusRight
- Defined in:
- tmpsets/set_pattern/106-type_plus_right.rb,
tmpsets/set/mod013-email/type_plus_right/user/follow.rb
Defined Under Namespace
Modules: User
Constant Summary collapse
- @@options =
~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/core/set_pattern/07_type_plus_right.rb ~~
{ junction_only: true, assigns_type: true, anchor_parts_count: 2 }
Class Method Summary collapse
- .anchor_name(card) ⇒ Object
- .follow_label(name) ⇒ Object
- .label(name) ⇒ Object
- .prototype_args(anchor) ⇒ Object
Methods inherited from Pattern::Abstract
#anchor_codenames, #anchor_parts, #anchor_parts_count, anchorless?, #find_anchor_id, #format_module_list, #initialize, #inspect, junction_only?, #lookup_module_list, module_key, #module_key, #module_list, new, pattern, #pattern, pattern_applies?, register, #rule_set_key, #safe_key, #to_s
Constructor Details
This class inherits a constructor from Card::Set::Pattern::Abstract
Class Method Details
.anchor_name(card) ⇒ Object
24 25 26 27 28 |
# File 'tmpsets/set_pattern/106-type_plus_right.rb', line 24 def anchor_name card left = card.left type_name = (left && left.type_name) || Card[Card.default_type_id].name "#{type_name}+#{card.cardname.tag}" end |
.follow_label(name) ⇒ Object
30 31 32 |
# File 'tmpsets/set_pattern/106-type_plus_right.rb', line 30 def follow_label name %(all "+#{name.to_name.tag}" on "#{name.to_name.left_name}s") end |
.label(name) ⇒ Object
13 14 15 |
# File 'tmpsets/set_pattern/106-type_plus_right.rb', line 13 def label name %(All "+#{name.to_name.tag}" cards on "#{name.to_name.left_name}" cards) end |
.prototype_args(anchor) ⇒ Object
17 18 19 20 21 22 |
# File 'tmpsets/set_pattern/106-type_plus_right.rb', line 17 def prototype_args anchor { name: "+#{anchor.tag}", supercard: Card.new(name: "*dummy", type: anchor.trunk_name) } end |