| Module | Rufus::Google::EntryMixin |
| In: |
lib/rufus/google.rb
|
A mixin for entry based objects (like cal events for example)
| entry | [R] |
Creates a google calendar event based on the info found in an atom-tools Entry instance.
# File lib/rufus/google.rb, line 183
183: def initialize (entry)
184: @entry = entry
185: end
# File lib/rufus/google.rb, line 199
199: def etag
200: @entry.extensions.attributes['gd:etag']
201: end
fetches a value in the extension part of the entry
:time => true will attempt to parse the value to a Time instance
# File lib/rufus/google.rb, line 210
210: def evalue (elt_name, att_name, options={})
211:
212: v = @entry.extensions.find { |e|
213: e.name == elt_name
214: }
215:
216: return nil unless v
217:
218: v = v.attribute(att_name)
219:
220: v = Time.parse(v.value) if options[:time] == true
221:
222: v
223: end