Class: Google::Log

Inherits:
Base
  • Object
show all
Defined in:
lib/google/log.rb

Instance Attribute Summary

Attributes inherited from Base

#doc

Instance Method Summary collapse

Methods inherited from Base

#initialize_doc, #initialize_row, #method_missing, #new_record?, #new_row, #save, #sync, #sync!

Constructor Details

#initialize(doc_id, message) ⇒ Log

Returns a new instance of Log.



4
5
6
7
8
# File 'lib/google/log.rb', line 4

def initialize(doc_id, message)
  super doc_id

  @message = message
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Google::Base

Instance Method Details

#id_columnObject



14
15
16
# File 'lib/google/log.rb', line 14

def id_column
  nil
end

#sync_attributesObject



18
19
20
21
22
23
# File 'lib/google/log.rb', line 18

def sync_attributes
  {
    :timestamp  => Time.now.to_s(:db),
    :message    => @message
  }
end

#worksheet_nameObject



10
11
12
# File 'lib/google/log.rb', line 10

def worksheet_name
  "sync log"
end