module FormStalker::Helpers
Public Instance Methods
extract_from_regex(string, regex)
click to toggle source
# File lib/form_stalker/helpers.rb, line 13 def extract_from_regex(string, regex) string.scan(regex).flatten end
json_to_hash(string)
click to toggle source
# File lib/form_stalker/helpers.rb, line 5 def json_to_hash(string) JSON.parse(string) end
string_to_array_of_integers(string)
click to toggle source
# File lib/form_stalker/helpers.rb, line 9 def string_to_array_of_integers(string) string.delete("'").delete('"').split(',').map(&:to_i) end