class String

Public Instance Methods

extract_colors() click to toggle source
# File lib/gatherer_set_parser/card_parser.rb, line 105
def extract_colors
  gsub(/Blue/, 'U').gsub(/Black/, 'B').gsub(/Red/, 'R').gsub(/Green/, 'G').
  gsub(/White/, 'W')
end
extract_phyrexia() click to toggle source
# File lib/gatherer_set_parser/card_parser.rb, line 99
def extract_phyrexia
  gsub(/Phyrexian Blue/, 'U/P').gsub(/Phyrexian Black/, 'B/P').
  gsub(/Phyrexian White/, 'W/P').gsub(/Phyrexian Red/, 'R/P').
  gsub(/Phyrexian Green/, 'G/P')
end
extract_unique_costs() click to toggle source
# File lib/gatherer_set_parser/card_parser.rb, line 110
def extract_unique_costs
  gsub(/Variable Colorless/, 'X').gsub(/Two/, '2').gsub(/or/, '/').
  gsub(/Snow/, 'S').gsub(/Tap/, 'T').gsub(/Untap/, 'Q')
end
parse_mana_cost() click to toggle source
# File lib/gatherer_set_parser/card_parser.rb, line 95
def parse_mana_cost
  extract_phyrexia.extract_colors.extract_unique_costs
end