class GroceryList::StringItemParser

Public Class Methods

read(string) click to toggle source
# File lib/grocery_list/item_parsers/string_item_parser.rb, line 3
def self.read(string)
  raise ArgumentError unless string.is_a? String
  string.split(',').map {|s| Item.new(s.strip)}
end