Class: EacRubyGemsUtils::Gem::Command

Inherits:
EacRubyUtils::Ruby::Command
  • Object
show all
Defined in:
lib/eac_ruby_gems_utils/gem/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gem, command_args, extra_options = {}) ⇒ Command

Returns a new instance of Command.



12
13
14
15
# File 'lib/eac_ruby_gems_utils/gem/command.rb', line 12

def initialize(gem, command_args, extra_options = {})
  @gem = gem
  super(command_args, extra_options)
end

Instance Attribute Details

#gemObject (readonly)

Returns the value of attribute gem.



10
11
12
# File 'lib/eac_ruby_gems_utils/gem/command.rb', line 10

def gem
  @gem
end

Instance Method Details

#chdir_rootObject

Changes current directory to the gem’s directory.



18
19
20
# File 'lib/eac_ruby_gems_utils/gem/command.rb', line 18

def chdir_root
  chdir(gem.root.to_path)
end

#envvar_gemfileObject



22
23
24
# File 'lib/eac_ruby_gems_utils/gem/command.rb', line 22

def envvar_gemfile
  envvar('BUNDLE_GEMFILE', gem.gemfile_path.to_path)
end