Class: Avm::Ruby::Gems::Generator
- Defined in:
- lib/avm/ruby/gems/generator.rb
Defined Under Namespace
Classes: VersionBuilder
Constant Summary collapse
- IDENT =
' '
- JOBS =
%w[root_directory gemspec root_lib version_lib static gemfile_lock].freeze
- TEMPLATE_VARIABLES =
%w[lib_path name root_module].freeze
Instance Method Summary collapse
- #eac_ruby_gem_support_version ⇒ Object
- #eac_ruby_utils_version ⇒ Object
- #lib_path ⇒ Object
- #name ⇒ Object
- #root_module ⇒ Object
- #root_module_close ⇒ Object
- #root_module_components ⇒ Object
- #root_module_inner_identation ⇒ Object
- #root_module_open ⇒ Object
Instance Method Details
#eac_ruby_gem_support_version ⇒ Object
21 22 23 |
# File 'lib/avm/ruby/gems/generator.rb', line 21 def eac_ruby_gem_support_version dependency_version('eac_ruby_gem_support') end |
#eac_ruby_utils_version ⇒ Object
25 26 27 |
# File 'lib/avm/ruby/gems/generator.rb', line 25 def eac_ruby_utils_version dependency_version('eac_ruby_utils') end |
#lib_path ⇒ Object
33 34 35 |
# File 'lib/avm/ruby/gems/generator.rb', line 33 def lib_path name.split('-').join('/') end |
#name ⇒ Object
29 30 31 |
# File 'lib/avm/ruby/gems/generator.rb', line 29 def name root_directory.basename.to_s end |
#root_module ⇒ Object
37 38 39 |
# File 'lib/avm/ruby/gems/generator.rb', line 37 def root_module lib_path.camelize end |
#root_module_close ⇒ Object
41 42 43 44 45 |
# File 'lib/avm/ruby/gems/generator.rb', line 41 def root_module_close root_module_components.count.times.map do |index| (IDENT * index) + 'end' end.reverse.join("\n") end |
#root_module_components ⇒ Object
57 58 59 |
# File 'lib/avm/ruby/gems/generator.rb', line 57 def root_module_components root_module.split('::') end |