class Tros::Schema::Field
Attributes
default[R]
name[R]
order[R]
type[R]
Public Class Methods
new(type, name, default=nil, order=nil, names=nil, namespace=nil)
click to toggle source
# File lib/tros/schema.rb 362 def initialize(type, name, default=nil, order=nil, names=nil, namespace=nil) 363 @type = subparse(type, names, namespace) 364 @name = name 365 @default = default 366 @order = order 367 end
Public Instance Methods
to_avro(names=Set.new)
click to toggle source
# File lib/tros/schema.rb 369 def to_avro(names=Set.new) 370 {'name' => name, 'type' => type.to_avro(names)}.tap do |tros| 371 tros['default'] = default if default 372 tros['order'] = order if order 373 end 374 end