questioning_alex 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51f5d24e74af7b4d5adfcf217c3ed3ac2e976600
4
- data.tar.gz: 8e24882632c9a8f667ec8bf81bbe5c741ccd3de6
3
+ metadata.gz: 430006caf9728d613b619bb94384a8ff607f6dc1
4
+ data.tar.gz: 73ad2d78194a38ac9557af3d4f3e13dcb530d7aa
5
5
  SHA512:
6
- metadata.gz: 1b703046784532bc132e6dbebead60456af804a4e8edafd5e4621170acfcf9e77fd0038981f78f064be8c941342f6618e647c3b2f039b9622f5478d27e3dcc03
7
- data.tar.gz: 258ac7bef434babc21bfdccb33e7393c8e8496f8ff58a89bc5aadff629f98f9a5182176f1d9535820947ebb66c7a80c4949de0408c88e2f0853894d06e8cfb6d
6
+ metadata.gz: 28d6075588d42876cc2f5e499bb7c3c9bbe4d17b3bec3fbddc5e28274eb772d96d74a997a7ae6c3a997b667c8ae2d889798fa4585917cce5b74a12108d3c0122
7
+ data.tar.gz: dda68a2723fe73cd19c26e21fd2d86c53556209b18d57e4765336c8abe7b1f6f0679049be345caf79c288b16aa3fee246baeba2b667df0e17f6a2c9ba8d900b0
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # QuestioningAlex
2
2
 
3
- TODO: Write a gem description
3
+ Alex needs to stop asking silly questions.
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,14 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ Create class;
22
+ class Alex
23
+ require QuestioningAlex
24
+ end
25
+
26
+ alex = Alex.new
27
+ alex.said("Whatever he said here")
28
+
22
29
 
23
30
  ## Contributing
24
31
 
@@ -1,3 +1,3 @@
1
1
  module QuestioningAlex
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -2,8 +2,12 @@ require "questioning_alex/version"
2
2
 
3
3
  module QuestioningAlex
4
4
 
5
- def tell
6
- 'Stop asking questions, Alex'
5
+ def said(string)
6
+ if string.include? '?'
7
+ 'Stop asking questions, Alex'
8
+ else
9
+ 'Stop making silly statements, Alex'
10
+ end
7
11
  end
8
12
 
9
13
  end
@@ -5,7 +5,12 @@ class Alex; include QuestioningAlex; end
5
5
  describe QuestioningAlex do
6
6
  let(:alex){Alex.new}
7
7
 
8
- it 'should print a phrase' do
9
- expect(alex.tell).to eq 'Stop asking questions, Alex'
8
+ it 'should return a phrase if Alex asked a question' do
9
+ expect(alex.said("What?")).to eq 'Stop asking questions, Alex'
10
10
  end
11
+
12
+ it 'should return a different phrase if Alex made a statement' do
13
+ expect(alex.said("What")).to eq 'Stop making silly statements, Alex'
14
+ end
15
+
11
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: questioning_alex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camilla van Klinken