Method: Cardname::Variants#safe_key

Defined in:
lib/cardname/variants.rb

#safe_keyObject

safe to be used in HTML as id (‘*’ and ‘+’ are not allowed), but the key is no longer unique. For example “A-XB” and “A+*B” have the same safe_key



24
25
26
# File 'lib/cardname/variants.rb', line 24

def safe_key
  @safe_key ||= key.tr('*', 'X').tr self.class.joint, '-'
end