class Avro::Schema::EnumSchema
Attributes
symbols[R]
Public Class Methods
new(name, space, symbols, names=nil)
click to toggle source
Calls superclass method
Avro::Schema::NamedSchema::new
# File lib/avro/schema.rb 309 def initialize(name, space, symbols, names=nil) 310 if symbols.uniq.length < symbols.length 311 fail_msg = 'Duplicate symbol: %s' % symbols 312 raise Avro::SchemaParseError, fail_msg 313 end 314 super(:enum, name, space, names) 315 @symbols = symbols 316 end
Public Instance Methods
to_avro(names=Set.new)
click to toggle source
Calls superclass method
Avro::Schema::NamedSchema#to_avro
# File lib/avro/schema.rb 318 def to_avro(names=Set.new) 319 avro = super 320 avro.is_a?(Hash) ? avro.merge('symbols' => symbols) : avro 321 end