T
Thomas Gagne
I'm trying to figure out how Ruby might unpack an .ics file for me.
When I look at a meeting's attendee and inspect the variable it outputs as
#<URI::MailTo:0xb762601c URL:mailto:[email protected]>
Being unfamiliar with Ruby, I can't tell if by looking at this output there's a way for me to get (e-mail address removed) from the variable or not.
If reading the code helps, it's below.
tgagne@ubuntu:~/work/heroku/ruby-sample$ cat test.rb
require 'rubygems'
require 'icalendar'
require 'date'
invite = File.open("invite.ics")
cals = Icalendar.parse(invite)
for each in cals do
puts each.inspect
puts
for eachEvent in each.events do
puts eachEvent.summary
puts eachEvent.description
puts eachEvent.location
puts eachEvent.status
puts eachEvent.dtstart
puts eachEvent.dtend
puts
puts eachEvent.organizer.inspect
for eachAttendee in eachEvent.attendees do
puts eachAttendee.inspect
end
end
end
When I look at a meeting's attendee and inspect the variable it outputs as
#<URI::MailTo:0xb762601c URL:mailto:[email protected]>
Being unfamiliar with Ruby, I can't tell if by looking at this output there's a way for me to get (e-mail address removed) from the variable or not.
If reading the code helps, it's below.
tgagne@ubuntu:~/work/heroku/ruby-sample$ cat test.rb
require 'rubygems'
require 'icalendar'
require 'date'
invite = File.open("invite.ics")
cals = Icalendar.parse(invite)
for each in cals do
puts each.inspect
puts
for eachEvent in each.events do
puts eachEvent.summary
puts eachEvent.description
puts eachEvent.location
puts eachEvent.status
puts eachEvent.dtstart
puts eachEvent.dtend
puts
puts eachEvent.organizer.inspect
for eachAttendee in eachEvent.attendees do
puts eachAttendee.inspect
end
end
end