No commit activity in last 3 years
No release in over 3 years
This gem is a Pokemon wrapper for engineers can call simple functions to create new pokemon with a name or type from the Pokemon Series from any of the 8 generations. You can call PokemonGenerator.pokemon() to get a random pokemon hash for you to use in you application along with being able to get the moves for that specific pokemon by its name a easy to work with array. If you wish to learn more on how to PokemonGenerator Gem please visit my Homepage.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.14
~> 10.0
~> 3.0
 Project Readme

PokemonGeneratorGem

Install

Add this line of code into your gemfile

  gem 'PokemonGenerator', '~>0.1.9'
  gem 'awesome_print'

Then type this in your terminal

  $ gem install bundler
  $ bundle

Usage

To get the name of a pokemon you call this method anywhere in your code.

  PokemonGenerator.name() => "Staravia"

To get a type of pokemon you call this method which will either return a string or an array containing strings of the different type that pokemon has.

  PokemonGenerator.type() => "Water"
  PokemonGenerator.type() => ["Water", "Fighter"]

If you want a whole pokemon object.

  PokemonGenerator.pokemon() => {
     "name" => "Diggersby",
     "type" => [
        [0] "Normal",
        [1] "Ground"
    ],
    "image" =>"https://img.pokemondb.net/artwork/diggersby.jpg",
    "moves" => [
        [ 0] "Agility",
        [ 1] "Bulldoze",
        [ 2] "Hammer Arm",
        [ 3] "Leer",
        [ 4] "Rototiller",
        . . .
    ]
  }

To choose a specific pokemon by its name.

  PokemonGenerator.pokemon({ name: "Squirtle" }) => {
     "name" => "Squirtle",
     "type" => "Water",
     "image" =>"https://img.pokemondb.net/artwork/squirtle.jpg",
    "moves" => [
        [ 0] "Tackle",
        [ 1] "Tail Whip",
        [ 2] "Water Gun",
        [ 3] "Withdraw",
        [ 4] "Bubble",
        . . .
    ]
  }

To choose a specific pokemon by its type.

  PokemonGenerator.pokemon({ type: "Fire" }) => {
     "name" => "Rotom",
     "type" => [
        [0] "Electric",
        [1] "Fire"
    ],
    "moves" => [
        [ 0] "Astonish",
        [ 1] "Charge",
        [ 2] "Confuse Ray",
        [ 3] "Discharge",
        [ 4] "Thunder Shock",
        . . .
    ]
  }

To choose a specific set of moves for a perticular pokemon.

  PokemonGenerator.moves({ name: "Squirtle" }) => [
    [ 0] "Tackle",
    [ 1] "Tail Whip",
    [ 2] "Water Gun",
    [ 3] "Withdraw",
    [ 4] "Bubble",
    . . .
]

New functionality for new version 0.1.9

Now you can get the link to an image for a specific pokemon

PokemonGenerator.image('Squirtle')
=> "https://img.pokemondb.net/artwork/squirtle.jpg"

You can also now evolve your pokemon!!!

PokemonGenerator.evolve('Squirtle')
=> {
      :name=>"Wartortle",
      :type=>"Water", 
      :image=>"https://img.pokemondb.net/artwork/wartortle.jpg", 
      :moves=>["Tackle", "Tail Whip", "Water Gun", "Withdraw", . . .
      ]
    }

Contribution

Any Bug reports and or pull requests are more than welcome at https://github.com/collinL34/PokemonGeneratorGem.

License

This code is free to use under the terms of the MIT license. MIT License.