Class: Card::Set::TypePlusRight

Inherits:
Pattern::Abstract
  • Object
show all
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

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