Module Rufus::Google::EntryMixin
In: lib/rufus/google.rb

A mixin for entry based objects (like cal events for example)

Methods

author   authors   etag   evalue   new   title  

Attributes

entry  [R] 

Public Class methods

Creates a google calendar event based on the info found in an atom-tools Entry instance.

[Source]

     # File lib/rufus/google.rb, line 183
183:     def initialize (entry)
184:       @entry = entry
185:     end

Public Instance methods

[Source]

     # File lib/rufus/google.rb, line 191
191:     def author
192:       @entry.authors.first
193:     end

[Source]

     # File lib/rufus/google.rb, line 195
195:     def authors
196:       @entry.authors
197:     end

[Source]

     # File lib/rufus/google.rb, line 199
199:     def etag
200:       @entry.extensions.attributes['gd:etag']
201:     end

[Source]

     # File lib/rufus/google.rb, line 187
187:     def title
188:       @entry.title.to_s
189:     end

Protected Instance methods

fetches a value in the extension part of the entry

:time => true will attempt to parse the value to a Time instance

[Source]

     # 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

[Validate]