Class: Googletastic::Base
- Inherits:
-
Hash
- Object
- Hash
- Googletastic::Base
- Includes:
- Mixins::Actions, Mixins::Attributes, Mixins::Finders, Mixins::Namespaces, Mixins::Pagination, Mixins::Parsing, Mixins::Requesting
- Defined in:
- lib/googletastic/base.rb
Direct Known Subclasses
AccessRule, Album, AppEngine, Apps, Calendar, Comment, Document, Event, Form, Group, Head, Image, Person, Row, Spreadsheet, Table, Worksheet
Constant Summary
Constants included from Mixins::Namespaces
Mixins::Namespaces::NAMESPACES
Instance Attribute Summary collapse
-
#acl ⇒ Object
Returns the value of attribute acl.
-
#attachment_path ⇒ Object
for docs, images…
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#etag ⇒ Object
ID’s are specifically the hash key for each entry.
-
#head ⇒ Object
ID’s are specifically the hash key for each entry.
-
#id ⇒ Object
ID’s are specifically the hash key for each entry.
-
#keep_raw ⇒ Object
Returns the value of attribute keep_raw.
-
#raw ⇒ Object
Returns the value of attribute raw.
-
#response ⇒ Object
Returns the value of attribute response.
-
#synced_with ⇒ Object
classes/records it is synced with.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Attributes included from Mixins::Attributes
Class Method Summary collapse
-
.client_class ⇒ Object
This is referring to the gdata gem’s implementation, which more closely maps to the google api override if you name classes differently.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Base
constructor
A new instance of Base.
- #to_xml ⇒ Object
Methods included from Mixins::Pagination
Methods included from Mixins::Finders
Methods included from Mixins::Parsing
Methods included from Mixins::Requesting
Methods included from Mixins::Attributes
#attribute_names, #has_attribute?, #inspect
Methods included from Mixins::Namespaces
Constructor Details
#initialize(attributes = {}) ⇒ Base
Returns a new instance of Base.
30 31 32 |
# File 'lib/googletastic/base.rb', line 30 def initialize(attributes = {}) self.attributes = attributes unless attributes.nil? end |
Instance Attribute Details
#acl ⇒ Object
Returns the value of attribute acl.
16 17 18 |
# File 'lib/googletastic/base.rb', line 16 def acl @acl end |
#attachment_path ⇒ Object
for docs, images…
18 19 20 |
# File 'lib/googletastic/base.rb', line 18 def @attachment_path end |
#created_at ⇒ Object
Returns the value of attribute created_at.
17 18 19 |
# File 'lib/googletastic/base.rb', line 17 def created_at @created_at end |
#etag ⇒ Object
ID’s are specifically the hash key for each entry. They don’t include the url for finding the document, which can be inferred from the “action” you’re taking on it, and the general api.
15 16 17 |
# File 'lib/googletastic/base.rb', line 15 def etag @etag end |
#head ⇒ Object
ID’s are specifically the hash key for each entry. They don’t include the url for finding the document, which can be inferred from the “action” you’re taking on it, and the general api.
15 16 17 |
# File 'lib/googletastic/base.rb', line 15 def head @head end |
#id ⇒ Object
ID’s are specifically the hash key for each entry. They don’t include the url for finding the document, which can be inferred from the “action” you’re taking on it, and the general api.
15 16 17 |
# File 'lib/googletastic/base.rb', line 15 def id @id end |
#keep_raw ⇒ Object
Returns the value of attribute keep_raw.
22 23 24 |
# File 'lib/googletastic/base.rb', line 22 def keep_raw @keep_raw end |
#raw ⇒ Object
Returns the value of attribute raw.
23 24 25 |
# File 'lib/googletastic/base.rb', line 23 def raw @raw end |
#response ⇒ Object
Returns the value of attribute response.
21 22 23 |
# File 'lib/googletastic/base.rb', line 21 def response @response end |
#synced_with ⇒ Object
classes/records it is synced with
20 21 22 |
# File 'lib/googletastic/base.rb', line 20 def synced_with @synced_with end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
17 18 19 |
# File 'lib/googletastic/base.rb', line 17 def updated_at @updated_at end |
Class Method Details
.client_class ⇒ Object
This is referring to the gdata gem’s implementation, which more closely maps to the google api override if you name classes differently.
39 40 41 |
# File 'lib/googletastic/base.rb', line 39 def client_class self.to_s.split("::").last end |
Instance Method Details
#to_xml ⇒ Object
45 46 47 |
# File 'lib/googletastic/base.rb', line 45 def to_xml self.class.marshall(self) end |