class Avro::Schema::NamedSchema

Attributes

name[R]
namespace[R]

Public Class Methods

new(type, name, namespace=nil, names=nil, logical_type=nil) click to toggle source
Calls superclass method Avro::Schema::new
    # File lib/avro/schema.rb
178 def initialize(type, name, namespace=nil, names=nil, logical_type=nil)
179   super(type, logical_type)
180   @name, @namespace = Name.extract_namespace(name, namespace)
181   names = Name.add_name(names, self)
182 end

Public Instance Methods

fullname() click to toggle source
    # File lib/avro/schema.rb
194 def fullname
195   @fullname ||= Name.make_fullname(@name, @namespace)
196 end
to_avro(names=Set.new) click to toggle source
Calls superclass method Avro::Schema#to_avro
    # File lib/avro/schema.rb
184 def to_avro(names=Set.new)
185   if @name
186     return fullname if names.include?(fullname)
187     names << fullname
188   end
189   props = {'name' => @name}
190   props.merge!('namespace' => @namespace) if @namespace
191   super.merge props
192 end