reciter 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +5 -0
- data/lib/reciter/parser.rb +6 -2
- data/lib/reciter/version.rb +1 -1
- metadata +1 -1
data/README.rdoc
CHANGED
data/lib/reciter/parser.rb
CHANGED
@@ -51,12 +51,16 @@ module Reciter
|
|
51
51
|
|
52
52
|
def handle_unparse_params(params)
|
53
53
|
if params[0].is_a? Symbol
|
54
|
-
[params[0] == :mechanic, params[1..-1]]
|
54
|
+
[params[0] == :mechanic, handle_unparse_params_list(params[1..-1])]
|
55
55
|
else
|
56
|
-
[false, params]
|
56
|
+
[false, handle_unparse_params_list(params)]
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
+
def handle_unparse_params_list(list)
|
61
|
+
list[0].is_a?(Array) ? list[0] : list
|
62
|
+
end
|
63
|
+
|
60
64
|
def validate_format(sequence)
|
61
65
|
subsequences = sequence.split(';')
|
62
66
|
raise InvalidInput unless !subsequences.empty? &&
|
data/lib/reciter/version.rb
CHANGED