Sha256: 03cd749706f0e9c5510a3eed938ff13b317a07c7711d620b73a582768bbc7a1c
Contents?: true
Size: 620 Bytes
Versions: 14
Compression:
Stored size: 620 Bytes
Contents
class Card module Set module Helpers def shortname parts = name.split "::" first = 2 # shortname eliminates Card::Set pattern_name = parts[first].underscore last = if pattern_name == "abstract" first + 1 else set_class = Pattern.find pattern_name first + set_class.anchor_parts_count end parts[first..last].join "::" end def abstract_set? name =~ /^Card::Set::Abstract::/ end def all_set? name =~ /^Card::Set::All::/ end end end end
Version data entries
14 entries across 14 versions & 1 rubygems