Class: WikiAvro::Avro::NamespaceWriter

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

Instance Method Summary collapse

Methods inherited from AvroWriter

#close

Instance Method Details

#schemaObject



113
114
115
# File 'lib/wikiavro/avro.rb', line 113

def schema
  NAMESPACE_SCHEMA
end

#write(key, casetype, name) ⇒ Object



117
118
119
120
121
# File 'lib/wikiavro/avro.rb', line 117

def write(key, casetype, name)
  encode 'key' => key.to_i,
         'case' => casetype,
         'name' => name || ''
end