Class: Card::Set::TypePlusRight
- Inherits:
-
Pattern::Base
- Object
- Pattern::Base
- Card::Set::TypePlusRight
- Defined in:
- platypus/tmp/set_pattern/107-type_plus_right.rb,
platypus/tmp/set/gem-defaults/mod022-style/type_plus_right/mod/style.rb,
platypus/tmp/set/gem-defaults/mod022-style/type_plus_right/set/style.rb,
platypus/tmp/set/gem-defaults/mod010-rules/type_plus_right/set/setting.rb,
platypus/tmp/set/gem-defaults/mod019-script/type_plus_right/mod/script.rb,
platypus/tmp/set/gem-defaults/mod019-script/type_plus_right/set/script.rb,
platypus/tmp/set/gem-defaults/mod014-account/type_plus_right/user/email.rb,
platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow.rb,
platypus/tmp/set/gem-defaults/mod010-rules/type_plus_right/set/structure.rb,
platypus/tmp/set/gem-defaults/mod014-account/type_plus_right/role/members.rb,
platypus/tmp/set/gem-defaults/mod014-account/type_plus_right/cardtype/account.rb,
platypus/tmp/set/gem-defaults/mod024-bootstrap/type_plus_right/bootswatch_skin/image.rb,
platypus/tmp/set/gem-defaults/mod024-bootstrap/type_plus_right/bootswatch_skin/colors.rb,
platypus/tmp/set/gem-defaults/mod024-bootstrap/type_plus_right/bootswatch_skin/parent.rb,
platypus/tmp/set/gem-defaults/mod024-bootstrap/type_plus_right/bootswatch_skin/variables.rb,
platypus/tmp/set/gem-defaults/mod024-bootstrap/type_plus_right/bootswatch_skin/stylesheets.rb,
platypus/tmp/set/gem-defaults/mod028-follow/type_plus_right/user/follow/follow_editor_helper.rb
Overview
Set Pattern: TypePlusRight
Patterned field names on a specific type
Defined Under Namespace
Modules: BootswatchSkin, Cardtype, Mod, Role, Set, User
Constant Summary collapse
- @@options =
{ compound_only: true, assigns_type: true, anchor_parts_count: 2 }
Instance Attribute Summary
Attributes included from Pattern::ClassMethods
#anchor_parts_count, #anchorless, #assigns_type, #compound_only, #pattern_code
Class Method Summary collapse
-
.anchor_name(card) ⇒ Object
-
.generic_label ⇒ Object
-
.label(name) ⇒ Object
-
.prototype_args(anchor) ⇒ Object
-
.short_label(name) ⇒ Object
Methods inherited from Pattern::Base
#anchor_codenames, #anchor_parts, #find_anchor_id, #format_module_list, #initialize, #inspect, #lookup_module_list, #module_key, #module_list, #rule_lookup_key, #safe_key, #to_s
Methods included from Pattern::ClassMethods
#anchorless?, #compound_only?, #generic_label, #module_key, #new, #pattern, #pattern_applies?, #pattern_id, #register
Constructor Details
This class inherits a constructor from Card::Set::Pattern::Base
Class Method Details
.anchor_name(card) ⇒ Object
36 37 38 |
# File 'platypus/tmp/set_pattern/107-type_plus_right.rb', line 36 def anchor_name card "#{left_type(card)}+#{card.name.tag}" end |
.generic_label ⇒ Object
25 26 27 |
# File 'platypus/tmp/set_pattern/107-type_plus_right.rb', line 25 def generic_label "given field cards on a given type" end |
.label(name) ⇒ Object
15 16 17 18 |
# File 'platypus/tmp/set_pattern/107-type_plus_right.rb', line 15 def label name name = name.to_name %(All "+#{name.tag}" cards on "#{name.left}" cards) end |
.prototype_args(anchor) ⇒ Object
29 30 31 32 33 34 |
# File 'platypus/tmp/set_pattern/107-type_plus_right.rb', line 29 def prototype_args anchor { name: "+#{anchor.tag}", supercard: Card.new(name: "*dummy", type: anchor.trunk_name) } end |
.short_label(name) ⇒ Object
20 21 22 23 |
# File 'platypus/tmp/set_pattern/107-type_plus_right.rb', line 20 def short_label name name = name.to_name %(all "+#{name.tag}" on "#{name.left}s") end |