qanda 0.2.1 → 0.2.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: 1103cf13ede7744d45ab1aeabbb3dbc6e45ec279
4
- data.tar.gz: fdc662158a8fa92e385e4b8775f43052ff27bd04
3
+ metadata.gz: 52f57c5bbdee4b2fcc54b19981b452aefd5769d2
4
+ data.tar.gz: 561406d7c2499108b23911a43f9f938b4e8587b6
5
5
  SHA512:
6
- metadata.gz: fdb8199f4bdf283727e7420c2fc254d2974231bb16750eeaee02e3ee804acb92c6272e5a5bb43288fd59e94a4db68f0e611110c43046785056045468498aa472
7
- data.tar.gz: 33d1a6802d47150618a7daa49e566d40456a3c77a5e1070e100e1cc35d0f12b30060e227bc6d5c08faff7550562e073ac941ee3fd090a80b1285d27091aa0339
6
+ metadata.gz: 34a0dd79c46f46f995cd67f7eaefc8d7dbf6fe3d027f127fd76bc3d812cdfb958c0927bf805b7e62d4a12b91d40bb0b65fa9d8daf9ce66857ac8bc8a18921c69
7
+ data.tar.gz: a0b50b47afcb0bc5a926657f95c416d09582df6cd19a79107efbfbd15c632de59d694df5603930ffc64c4790e6c6af80c3396088237ddae48230c4ec0f98133f
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qanda (0.2.0)
4
+ qanda (0.2.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module Qanda
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -1,7 +1,7 @@
1
1
  module QandA
2
2
  module Question
3
3
  class Text < Question
4
- def initialize(message = '', text = '', default = nil)
4
+ def initialize(message = '', default = nil)
5
5
  super(message: message, default: default)
6
6
  end
7
7
 
@@ -1,5 +1,7 @@
1
1
  module QandA
2
2
  class Questionnaire
3
+ attr_reader :questions
4
+
3
5
  TYPE_REGISTER = {
4
6
  text: QandA::Question::Text,
5
7
  multiple_choice: QandA::Question::MultipleChoice,
@@ -16,9 +18,10 @@ module QandA
16
18
  unless TYPE_REGISTER.has_key?(type)
17
19
  raise NoSuchQuestionTypeError.new("No such question type '#{type}'")
18
20
  end
19
- @questions[key.to_sym] = TYPE_REGISTER[type].new(*args)
21
+ @questions[key] = TYPE_REGISTER[type].new(*args)
20
22
  end
21
23
 
24
+
22
25
  def run
23
26
  @questions.each do |key, q|
24
27
  q.ask
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qanda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wesley Boynton
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-24 00:00:00.000000000 Z
11
+ date: 2016-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler