ask_awesomely 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f65ed96a4fadf6c4145ce2a2c70a2888230b975c
4
- data.tar.gz: f7428617452f6c68c26fde0d3695dddc68923113
3
+ metadata.gz: 6ee86faeff29ad660c9a3db8184e217e38d9917f
4
+ data.tar.gz: 04023fa8c91160188afa489b76e9b45722b889a9
5
5
  SHA512:
6
- metadata.gz: c69eefcb41c2e697f87643707d25df72403c7b21e8ff743761e03830390cfb987b5fa064de9c46b49fd5d3b39e9fdfb4d7ad867a9d6962948e84039f4bd5e2d7
7
- data.tar.gz: 2acde8149aaf21aa50b94feefe555042955c167bc35f6bb5bd81dce2f26391a60422baca686cdc62bc49c3f03821d1abaccd8d81cc372ddd0e8ac4f201e0e7dd
6
+ metadata.gz: f8381d406e0cb9971ab0532d450574d715e700e1ce51ff1c63ec6c32871fd43a39eca3c62cb4ca2ffd6b1c48347cfd8fc343238f1106fe252ed4ed8144dab8fc
7
+ data.tar.gz: 733d49629d4cb0a3c0bbf48d0a26f4fa56b7f792b4263b1d2fa59726bfaa64a52c99a36bf28f6cb371fce3706ddba1bdafc85575c8354dbb10b5922c13adf8bc
@@ -25,7 +25,7 @@ module AskAwesomely
25
25
  field_type = type.to_s.split('_').map(&:capitalize).join
26
26
  field = AskAwesomely::Field.const_get(field_type)
27
27
  field.new(type, &block)
28
- rescue NameError
28
+ rescue NameError => e
29
29
  raise FieldTypeError, "Field #{type} <#{field}> does not exist, please use one of: #{VALID_FIELD_TYPES.join(", ")}"
30
30
  end
31
31
 
@@ -40,6 +40,10 @@ module AskAwesomely
40
40
  @state.question = question
41
41
  end
42
42
 
43
+ def description(text)
44
+ @state.description = text
45
+ end
46
+
43
47
  def required
44
48
  @state.required = true
45
49
  end
@@ -1,3 +1,3 @@
1
1
  module AskAwesomely
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ask_awesomely
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Machin