Class: Card::Set::Type

Inherits:
Pattern::Abstract show all
Defined in:
lib/card/set_pattern.rb

Instance Method Summary collapse

Methods inherited from Pattern::Abstract

#anchor_codenames, #anchor_parts, #anchor_parts_count, anchorless?, #format_module_list, #inspect, junction_only?, #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.



180
181
182
183
184
# File 'lib/card/set_pattern.rb', line 180

def initialize card
  super
  # support type inheritance
  @inherit_card = card unless module_key
end

Instance Method Details

#lookup_module_list(modules_hash) ⇒ Object



186
187
188
189
# File 'lib/card/set_pattern.rb', line 186

def lookup_module_list modules_hash
  lookup_key = module_key || inherited_key
  modules_hash[lookup_key] if lookup_key
end