Class: Card::Set::Type
- Inherits:
-
Pattern::Base
- Object
- Pattern::Base
- Card::Set::Type
- Defined in:
- lib/card/set/type.rb
Instance Method Summary collapse
-
#initialize(card) ⇒ Type
constructor
A new instance of Type.
- #lookup_module_list(modules_hash) ⇒ Object
Methods inherited from Pattern::Base
#anchor_codenames, #anchor_parts, #anchor_parts_count, anchorless?, #find_anchor_id, #format_module_list, generic_label, #inspect, junction_only?, module_key, #module_key, #module_list, new, pattern, #pattern, pattern_applies?, register, #rule_set_key, #safe_key, #to_s
Constructor Details
#initialize(card) ⇒ Type
Returns a new instance of Type.
4 5 6 7 8 |
# File 'lib/card/set/type.rb', line 4 def initialize card super # support type inheritance @inherit_card = card unless module_key end |
Instance Method Details
#lookup_module_list(modules_hash) ⇒ Object
10 11 12 13 |
# File 'lib/card/set/type.rb', line 10 def lookup_module_list modules_hash lookup_key = module_key || inherited_key modules_hash[lookup_key] if lookup_key end |