class RichBitch

require “rich_bitch/version”

Attributes

final[R]
input[R]
money_string[R]

Public Class Methods

new() click to toggle source
# File lib/rich_bitch.rb, line 6
def initialize
  puts "What would you like to say today?"
  @input = gets.chomp.downcase
  process
  money_amount
end

Public Instance Methods

money_amount() click to toggle source
# File lib/rich_bitch.rb, line 19
def money_amount
  if @money_string.include?('$')
    puts "You've got money!"
  else
    puts "Sorry, no money for you"
  end
end
process() click to toggle source
# File lib/rich_bitch.rb, line 13
def process
  split_string = input.split('')
  @final = split_string.each {|letter| letter.sub!('s', '$')}
  puts @money_string = final.join('')
end