rich_bitch 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/rich_bitch +3 -0
- data/lib/rich_bitch.rb +28 -0
- metadata +47 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c7c8b53174b59410628261caf380b12aafd3109d
|
4
|
+
data.tar.gz: d84311ca3aa155c4fb4856f82f197e6f407263f3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b383729a1ff2e44d06c523d637d0c68c6ec5166fac7025e434bf383d1f208c76f286a111a0eb128b370aa2941109717b4bec2aa3cd8898f68694e05ad283da8b
|
7
|
+
data.tar.gz: e43855c121591da3aa156db476cee1c014621c7a1e109170cffadc330fe69866d5885c0189fb7a0e193d4ed4d89d160dddb5d37e7c5b8d90033ca676b8a87387
|
data/bin/rich_bitch
ADDED
data/lib/rich_bitch.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# require "rich_bitch/version"
|
2
|
+
|
3
|
+
class RichBitch
|
4
|
+
attr_reader :input, :final, :money_string
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
puts "What would you like to say today?"
|
8
|
+
@input = gets.chomp.downcase
|
9
|
+
process
|
10
|
+
money_amount
|
11
|
+
end
|
12
|
+
|
13
|
+
def process
|
14
|
+
split_string = input.split('')
|
15
|
+
@final = split_string.each {|letter| letter.sub!('s', '$')}
|
16
|
+
puts @money_string = final.join('')
|
17
|
+
end
|
18
|
+
|
19
|
+
def money_amount
|
20
|
+
if @money_string.include?('$')
|
21
|
+
puts "You've got money!"
|
22
|
+
else
|
23
|
+
puts "Sorry, no money for you"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
RichBitch.new
|
metadata
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rich_bitch
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Julie Graceffa
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-09-06 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Changes all s's in your text to money signs ($).
|
14
|
+
email:
|
15
|
+
- julie.graceffa@gmail.com
|
16
|
+
executables:
|
17
|
+
- rich_bitch
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- bin/rich_bitch
|
22
|
+
- lib/rich_bitch.rb
|
23
|
+
homepage: https://github.com/jewls618/RichBitch-gem
|
24
|
+
licenses:
|
25
|
+
- MIT
|
26
|
+
metadata: {}
|
27
|
+
post_install_message:
|
28
|
+
rdoc_options: []
|
29
|
+
require_paths:
|
30
|
+
- lib
|
31
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ">="
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
requirements: []
|
42
|
+
rubyforge_project:
|
43
|
+
rubygems_version: 2.6.6
|
44
|
+
signing_key:
|
45
|
+
specification_version: 4
|
46
|
+
summary: convert 's' to '$'.
|
47
|
+
test_files: []
|