module LitaAws::Parser
Protected Instance Methods
get_options(response)
click to toggle source
# File lib/lita-aws/parser.rb, line 6 def get_options(response) parse_options(response.matches.first.last.to_s) end
parse_options(opt_str)
click to toggle source
# File lib/lita-aws/parser.rb, line 10 def parse_options(opt_str) opt_str.scan(/\-\-([ a-zA-Z0-9\-]+?)[ ]+([^ ]+)/).inject({}) do |h, groups| h.merge(groups[0].to_sym => groups[1]) end end