class Create::MagicConchShell

The main class to initialize a magic conch shell

Example

# Create Instance of MagicConchShell
mcs = Create::MagicConchShell.new

Public Class Methods

new() click to toggle source

Initialize MagicConchShell with Create::ANSWERS_OF_LIFE

# File lib/magic_conch_shell/create_magic_conch_shell.rb, line 31
def initialize
  @phrases = ANSWERS_OF_LIFE
end

Public Instance Methods

pull_the_cord() click to toggle source

Let the magic conch shell speak out

Example

# Create Instance of MagicConchShell:
mcs = Create::MagicConchShell.new

# Use the MagicConchShell without color:
mcs.pull_the_cord

# Use the MagicConchShell with color randomize:
mcs.pull_the_cord.color_randomize
# File lib/magic_conch_shell/create_magic_conch_shell.rb, line 50
def pull_the_cord
  @phrases[rand(@phrases.length - 1)].chars
end