Class: WikiAvro::Avro::PageWriter

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

Instance Method Summary collapse

Methods inherited from AvroWriter

#close

Instance Method Details

#schemaObject



125
126
127
# File 'lib/wikiavro/avro.rb', line 125

def schema
  PAGE_SCHEMA
end

#write(ns, id, title, redirect, sha1) ⇒ Object



129
130
131
132
133
134
135
# File 'lib/wikiavro/avro.rb', line 129

def write(ns, id, title, redirect, sha1)
  encode 'id' => id.to_i,
         'ns' => ns.to_i,
         'title' => title,
         'redirect' => redirect,
         'sha1' => sha1
end