Class: GDocsAPIWrapper::Models::Document
- Inherits:
-
Object
- Object
- GDocsAPIWrapper::Models::Document
- Defined in:
- lib/gdocsapi-wrapper/models/document.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#link ⇒ Object
Returns the value of attribute link.
-
#published ⇒ Object
Returns the value of attribute published.
-
#title ⇒ Object
Returns the value of attribute title.
-
#updated ⇒ Object
Returns the value of attribute updated.
Class Method Summary collapse
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
31 32 33 |
# File 'lib/gdocsapi-wrapper/models/document.rb', line 31 def @author end |
#link ⇒ Object
Returns the value of attribute link.
30 31 32 |
# File 'lib/gdocsapi-wrapper/models/document.rb', line 30 def link @link end |
#published ⇒ Object
Returns the value of attribute published.
28 29 30 |
# File 'lib/gdocsapi-wrapper/models/document.rb', line 28 def published @published end |
#title ⇒ Object
Returns the value of attribute title.
27 28 29 |
# File 'lib/gdocsapi-wrapper/models/document.rb', line 27 def title @title end |
#updated ⇒ Object
Returns the value of attribute updated.
29 30 31 |
# File 'lib/gdocsapi-wrapper/models/document.rb', line 29 def updated @updated end |
Class Method Details
.parse(element) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/gdocsapi-wrapper/models/document.rb', line 33 def self.parse(element) document = GDocsAPIWrapper::Models::Document.new document.title = element.elements['title'].text document.published = DateTime.parse(element.elements['published'].text) document.updated = DateTime.parse(element.elements['updated'].text) document.link = element.elements['link[@rel="alternate"]'].attributes['href'] document. = GDocsAPIWrapper::Models::Author.parse(element.elements['author']) return document end |