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 +4 -4
- data/lib/ask_awesomely/field/field.rb +5 -1
- data/lib/ask_awesomely/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ee86faeff29ad660c9a3db8184e217e38d9917f
|
4
|
+
data.tar.gz: 04023fa8c91160188afa489b76e9b45722b889a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|