class Pokemongodb

Public Class Methods

to_s() click to toggle source

Returns formatted move name for display

Example:

>> Pokemongodb::Move::Acid.to_s
=> "acid"

>> Pokemongodb::Move::AerialAce.to_s
=> "aerial ace"

>> Pokemongodb::Pokemon::Squirtle.to_s
=> "squirtle"

>> Pokemongodb::Type::Dark.to_s
=> "dark"
Calls superclass method
# File lib/pokemongodb.rb, line 17
def self.to_s
  regex = /(?=[A-Z])/
  super.split("::").last.split(regex).join(" ").downcase
end