class Tros::Schema::NamedSchema
Attributes
name[R]
namespace[R]
Public Class Methods
new(type, name, namespace=nil, names=nil)
click to toggle source
Calls superclass method
Tros::Schema::new
# File lib/tros/schema.rb 182 def initialize(type, name, namespace=nil, names=nil) 183 super(type) 184 @name, @namespace = Name.extract_namespace(name, namespace) 185 names = Name.add_name(names, self) 186 end
Public Instance Methods
fullname()
click to toggle source
# File lib/tros/schema.rb 198 def fullname 199 @fullname ||= Name.make_fullname(@name, @namespace) 200 end
to_avro(names=Set.new)
click to toggle source
Calls superclass method
Tros::Schema#to_avro
# File lib/tros/schema.rb 188 def to_avro(names=Set.new) 189 if @name 190 return fullname if names.include?(fullname) 191 names << fullname 192 end 193 props = {'name' => @name} 194 props.merge!('namespace' => @namespace) if @namespace 195 super.merge props 196 end