Class: EacLauncher::Ruby::Gem::Build
- Inherits:
-
Object
- Object
- EacLauncher::Ruby::Gem::Build
- Includes:
- EacRubyUtils::Console::Speaker
- Defined in:
- lib/eac_launcher/ruby/gem/build.rb
Instance Method Summary collapse
- #build ⇒ Object
- #builded? ⇒ Boolean
- #close ⇒ Object
-
#initialize(original_gem_root) ⇒ Build
constructor
A new instance of Build.
- #output_file ⇒ Object
Constructor Details
#initialize(original_gem_root) ⇒ Build
Returns a new instance of Build.
14 15 16 |
# File 'lib/eac_launcher/ruby/gem/build.rb', line 14 def initialize(original_gem_root) @original_gem_root = original_gem_root end |
Instance Method Details
#build ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/eac_launcher/ruby/gem/build.rb', line 28 def build return if builded? copy_gem_files build_gem check_gem_empty_size check_gem_version end |
#builded? ⇒ Boolean
24 25 26 |
# File 'lib/eac_launcher/ruby/gem/build.rb', line 24 def builded? output_file.present? && ::File.exist?(output_file) end |
#close ⇒ Object
37 38 39 40 |
# File 'lib/eac_launcher/ruby/gem/build.rb', line 37 def close ::FileUtils.remove_entry(@gem_root) if @gem_root && ::File.directory?(@gem_root) @gem_root = nil end |
#output_file ⇒ Object
18 19 20 21 22 |
# File 'lib/eac_launcher/ruby/gem/build.rb', line 18 def output_file return nil unless @gem_root @gem_root.find_files_with_extension('.gem').first end |