Class: Enterprisifier::CodeGeneration::ElementGenerator
- Inherits:
-
CodeGenerator
- Object
- CodeGenerator
- Enterprisifier::CodeGeneration::ElementGenerator
- Defined in:
- lib/enterprisifier/code_generation/generators/element_generator.rb
Constant Summary
Constants inherited from CodeGenerator
Instance Attribute Summary
Attributes inherited from CodeGenerator
Instance Method Summary collapse
Methods inherited from CodeGenerator
build, #entity_or_attr_name, extends, #extension_require, #initialize, macro_mappings, #macro_reference_require, #name, register, #requires, #to_ruby, #to_s, #write_file
Constructor Details
This class inherits a constructor from Enterprisifier::CodeGeneration::CodeGenerator
Instance Method Details
#attribute_macros ⇒ Object
20 21 22 23 24 |
# File 'lib/enterprisifier/code_generation/generators/element_generator.rb', line 20 def attribute_macros @attribute_macros ||= super.tap do |m| m << [:substitution_group, @generator.modularize_type(@node.substitution_group, @mod_name, "Elements")] if @node.substitution_group end end |
#macro_reference_type ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/enterprisifier/code_generation/generators/element_generator.rb', line 10 def macro_reference_type if @node.ref @generator.modularize_type(@node.ref, @mod_name, "Elements") elsif @node.element_type @generator.modularize_type(@node.element_type, @mod_name, "Types") else nil end end |