hangry 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
@@ -44,10 +44,10 @@ module Hangry
|
|
44
44
|
clean_string node_with_itemprop(:description).content
|
45
45
|
end
|
46
46
|
def parse_ingredients
|
47
|
-
nodes_with_itemprop(self.class.ingredient_itemprop).map(&:content).map
|
47
|
+
nodes_with_itemprop(self.class.ingredient_itemprop).map(&:content).map { |ingredient|
|
48
48
|
# remove newlines and excess whitespace from ingredients
|
49
49
|
clean_string ingredient
|
50
|
-
|
50
|
+
}.reject(&:blank?)
|
51
51
|
end
|
52
52
|
def parse_instructions
|
53
53
|
clean_string node_with_itemprop(:recipeInstructions).content, preserve_newlines: true
|
data/lib/hangry/version.rb
CHANGED