module Avro::Builder
Constants
- AttributeError
- VERSION
Public Class Methods
add_load_path(*paths)
click to toggle source
Add paths that will be searched for definitions
# File lib/avro/builder.rb, line 26 def self.add_load_path(*paths) Avro::Builder::DSL.load_paths.merge(paths) end
build(str = nil, filename: nil, &block)
click to toggle source
Accepts a string or block to eval to define a JSON schema
# File lib/avro/builder.rb, line 16 def self.build(str = nil, filename: nil, &block) Avro::Builder::DSL.new(str, filename: filename, &block).to_json end
build_dsl(str = nil, filename: nil, &block)
click to toggle source
Accepts a string or block to eval and returns the Avro::Builder::DSL
object
# File lib/avro/builder.rb, line 11 def self.build_dsl(str = nil, filename: nil, &block) Avro::Builder::DSL.new(str, filename: filename, &block) end
build_schema(str = nil, filename: nil, &block)
click to toggle source
Accepts a string or block to eval and returns an Avro::Schema object
# File lib/avro/builder.rb, line 21 def self.build_schema(str = nil, filename: nil, &block) Avro::Builder::DSL.new(str, filename: filename, &block).as_schema end