Class: EacRubyGemsUtils::Gem::Command
- Inherits:
-
EacRubyUtils::Ruby::Command
- Object
- EacRubyUtils::Ruby::Command
- EacRubyGemsUtils::Gem::Command
- Defined in:
- lib/eac_ruby_gems_utils/gem/command.rb
Instance Attribute Summary collapse
-
#gem ⇒ Object
readonly
Returns the value of attribute gem.
Instance Method Summary collapse
-
#chdir_root ⇒ Object
Changes current directory to the gem’s directory.
- #envvar_gemfile ⇒ Object
-
#initialize(gem, command_args, extra_options = {}) ⇒ Command
constructor
A new instance of Command.
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, = {}) @gem = gem super(command_args, ) end |
Instance Attribute Details
#gem ⇒ Object (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_root ⇒ Object
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_gemfile ⇒ Object
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 |