Class: WikiAvro::Avro::LqtWriter

Inherits:
AvroWriter show all
Defined in:
lib/wikiavro/avro.rb

Instance Method Summary collapse

Methods inherited from AvroWriter

#close

Instance Method Details

#schemaObject



191
192
193
# File 'lib/wikiavro/avro.rb', line 191

def schema
  LQT_SCHEMA
end

#write(subject, parent, ancestor, page, id, summary_page, author, edit_status, type, signature) ⇒ Object



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# File 'lib/wikiavro/avro.rb', line 195

def write(subject, parent, ancestor, page, id, summary_page,
          author, edit_status, type, signature)
  parent = parent.to_i if parent
  ancestor = ancestor.to_i if ancestor

  encode 'subject' => subject,
         'parent' => parent,
         'ancestor' => ancestor,
         'page' => page,
         'id' => id.to_i,
         'summary_page' => summary_page,
         'author' => author,
         'edit_status' => edit_status,
         'type' => type,
         'signature' => signature
end