vcard: remove bytes and parseable?, which lib never called
Both were born test-only in the post-parsed-abstraction change and
never gained a production caller, unlike escape and fold, whose keep
is documented.
Assisted-by: GLM-5.3 via pi
diff --git a/lib/pro_tacts/vcard.rb b/lib/pro_tacts/vcard.rb
index 24f44f0..4dbed7a 100644
--- a/lib/pro_tacts/vcard.rb
+++ b/lib/pro_tacts/vcard.rb
@@ -135,15 +135,9 @@ module ProTacts
@bytes = bytes
end
- #: () -> String
- def bytes
- @bytes
- end
-
# The card's properties, parsed once on the first structured read.
# Nil when the bytes are not a vCard — a caller is expected to carry
- # on serving the bytes (ParseError's rule, held one level up), and
- # #parseable? is the question to ask about it.
+ # on serving the bytes (ParseError's rule, held one level up).
#: () -> Array[Property]?
def properties
return @properties if defined?(@properties)
@@ -153,11 +147,6 @@ module ProTacts
@properties = nil
end
- #: () -> bool
- def parseable?
- !properties.nil?
- end
-
# Whether the parsed properties carry the envelope RFC 2426 section
# 4 requires of a card: BEGIN:VCARD first, END:VCARD last, and a
# VERSION in between. Deciding that is deliberately not the
diff --git a/test/pro_tacts/vcard/test_lines.rb b/test/pro_tacts/vcard/test_lines.rb
index 6144c55..a0ee385 100644
--- a/test/pro_tacts/vcard/test_lines.rb
+++ b/test/pro_tacts/vcard/test_lines.rb
@@ -9,11 +9,9 @@ class VCardLinesTest < Minitest::Test
## the card, read once
- def test_a_card_reads_its_properties_beside_its_bytes
+ def test_a_card_reads_its_properties
card = VCARD.new(CARD)
- assert_equal CARD, card.bytes
- assert card.parseable?
assert_equal %w[BEGIN VERSION FN UID END], card.properties.map(&:name)
end
@@ -21,8 +19,6 @@ class VCardLinesTest < Minitest::Test
def test_the_parse_happens_only_when_read
card = VCARD.new("this is not a vCard\r\n")
- assert_equal "this is not a vCard\r\n", card.bytes
- refute card.parseable?
assert_nil card.properties
refute card.card?
assert_nil card.uid