module Schematrix::Generators::DslNaming
Naming overrides shared by the DSL generators: builder classes nest under a Dsl module level, so the builder family and the data-class family can never fold onto one constant or one file, and the builderโs own surface names stay reserved.
Constants
- RESERVED_METHOD_NAMES
-
A property whose mangled name lands here would override the generated entry point, the dump method, the catch-all setter, or the constructor; it takes the keyword treatment instead (a trailing underscore), with ORIGINAL_KEYS still recording the mapping.
Public Class Methods
Source
# File lib/schematrix/generators/base.rb, line 648 def self.included(base) base.extend(ClassMethods) end
Public Instance Methods
# File lib/schematrix/generators/base.rb, line 661 def class_name_from_path(uri, name = nil) "Dsl::#{super}" end
Calls superclass method
Source
# File lib/schematrix/generators/base.rb, line 667 def property_name(key) name = super name = "#{name}_" if RESERVED_METHOD_NAMES.include?(name) name end
Calls superclass method