brewster / vcardigan

Ruby vCard Builder/Parser
MIT License
71 stars 23 forks source link

Accept Array as property args. #2

Closed linjunpop closed 11 years ago

linjunpop commented 11 years ago

Ex.

vcard.name ["Foo", "Bar"]
mlmorg commented 11 years ago

Hey Jun Lin,

Thanks for the pull request! What's the difference between this and just doing:

args = ["Foo", "Bar"]
vcard.name *args

I'm mostly hesitant about adding this because the specification includes the ability to have multiple values for a single compound property value (separated by a comma) — which I think would be a better use-case for accepting an array as an argument. For example:

vcard.name "Strummer", ["Joe", "Joseph"]

becomes:

N:Strummer;Joe,Joseph;;;

I just never got around to adding that feature... however, I'm working on some additions so I've added it back to my list.

I'm going to close this for now but if you feel there's a reason I'm missing for integrating this ability, please let me know! Thanks again.