lib/jan/code.rb in jan-0.2.0 vs lib/jan/code.rb in jan-0.2.1
- old
+ new
@@ -16,10 +16,21 @@
def valid?
@body.valid? && @check_digit.valid? && @body.calculate_check_digit == @check_digit
end
# @return [boolean]
+ # @deprecated Use `instore_marking?` instead.
def instore_code?
+ instore_marking?
+ end
+
+ # @return [boolean]
+ def instore_marking?
@body.start_with?('2')
+ end
+
+ # @return [boolean]
+ def source_marking?
+ !instore_marking?
end
end
end