Class: Enterprisifier::CodeGeneration::GroupGenerator
- Inherits:
-
CodeGenerator
- Object
- CodeGenerator
- Enterprisifier::CodeGeneration::GroupGenerator
- Defined in:
- lib/enterprisifier/code_generation/generators/group_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, #to_ruby, #to_s, #write_file
Constructor Details
This class inherits a constructor from Enterprisifier::CodeGeneration::CodeGenerator
Instance Method Details
#attribute_macros ⇒ Object
10 11 12 13 14 |
# File 'lib/enterprisifier/code_generation/generators/group_generator.rb', line 10 def attribute_macros @attribute_macros ||= super.tap do |m| m << [:ref, @generator.modularize_type(@node.ref, @mod_name, "Groups")] if @node.ref end end |
#requires ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/enterprisifier/code_generation/generators/group_generator.rb', line 16 def requires @requires ||= super.tap do |r| next unless @node.ref mt = @generator.modularize_type(@node.ref, @mod_name, "Groups") p = mt.split("::").map(&:underscore).join("/") r << p end end |