module JSON::SchemaDsl::AstNode::ClassMethods
The class methods that ast nodes should have
Public Instance Methods
builder()
click to toggle source
Override this to set a custom builder for your type. @return [Class] A new builder class for this type.
# File lib/json/schema_dsl/ast_node.rb, line 48 def builder ::JSON::SchemaDsl::Builder.define_builder(self) end
infer_type()
click to toggle source
@return [String] The type that will be used in I.E. `type: 'object'` attributes.
Also used to give names to the dsl and builder methods.
# File lib/json/schema_dsl/ast_node.rb, line 37 def infer_type type = name.split('::').last.underscore type == 'entity' ? nil : type end
Also aliased as: type_method_name
type_method_name()
@method! type_method_name
Override this method to set the name of the dsl method for this type.
Alias for: infer_type