lib/x12/loop.rb in pd_x12-1.5.0 vs lib/x12/loop.rb in pd_x12-1.5.1
- old
+ new
@@ -70,10 +70,18 @@
}
else
''
end
end # render
-
+
+
+ # Formats a printable string containing the loops element's content
+ # added to provide compatability with ruby > 2.0.0
+ def inspect
+ "#{self.class.to_s.sub(/^.*::/, '')} (#{name}) #{repeats} =<#{parsed_str}, #{next_repeat.inspect}> ".gsub(/\\*\"/, '"')
+ end
+
+
# Provides looping through repeats of a message
def each
res = self.to_a
0.upto(res.length - 1) do |x|
yield res[x]