Module: Avm::EacRubyBase1::SourceGenerators::Base::RootModule
- Defined in:
- lib/avm/eac_ruby_base1/source_generators/base/root_module.rb
Instance Method Summary collapse
- #root_module ⇒ Object
- #root_module_close ⇒ Object
- #root_module_components ⇒ Object
- #root_module_inner_identation ⇒ Object
- #root_module_open ⇒ Object
Instance Method Details
#root_module ⇒ Object
8 9 10 |
# File 'lib/avm/eac_ruby_base1/source_generators/base/root_module.rb', line 8 def root_module lib_path.camelize end |
#root_module_close ⇒ Object
12 13 14 15 16 |
# File 'lib/avm/eac_ruby_base1/source_generators/base/root_module.rb', line 12 def root_module_close root_module_components.count.times.map do |index| "#{IDENT * index}end" end.reverse.join("\n") end |
#root_module_components ⇒ Object
28 29 30 |
# File 'lib/avm/eac_ruby_base1/source_generators/base/root_module.rb', line 28 def root_module_components root_module.split('::') end |
#root_module_inner_identation ⇒ Object
18 19 20 |
# File 'lib/avm/eac_ruby_base1/source_generators/base/root_module.rb', line 18 def root_module_inner_identation IDENT * root_module_components.count end |
#root_module_open ⇒ Object
22 23 24 25 26 |
# File 'lib/avm/eac_ruby_base1/source_generators/base/root_module.rb', line 22 def root_module_open root_module_components.each_with_index.map do |component, index| "#{IDENT * index}module #{component}" end.join("\n") end |