class Tros::Schema::FixedSchema
Attributes
size[R]
Public Class Methods
new(name, space, size, names=nil)
click to toggle source
Calls superclass method
Tros::Schema::NamedSchema::new
# File lib/tros/schema.rb 346 def initialize(name, space, size, names=nil) 347 # Ensure valid cto args 348 raise AvroError, 'Fixed Schema requires a valid integer for size property.' unless size.is_a?(Integer) 349 super(:fixed, name, space, names) 350 @size = size 351 end
Public Instance Methods
to_avro(names=Set.new)
click to toggle source
Calls superclass method
Tros::Schema::NamedSchema#to_avro
# File lib/tros/schema.rb 353 def to_avro(names=Set.new) 354 tros = super 355 tros.is_a?(Hash) ? tros.merge('size' => size) : tros 356 end