Class: Gem::Commands::ClasspathCommand
- Inherits:
-
Gem::Command
- Object
- Gem::Command
- Gem::Commands::ClasspathCommand
- Defined in:
- lib/rubygems/commands/classpath_command.rb
Instance Attribute Summary collapse
-
#cp_builder ⇒ Object
readonly
Returns the value of attribute cp_builder.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ ClasspathCommand
constructor
A new instance of ClasspathCommand.
- #usage ⇒ Object
Constructor Details
#initialize ⇒ ClasspathCommand
Returns a new instance of ClasspathCommand.
9 10 11 12 |
# File 'lib/rubygems/commands/classpath_command.rb', line 9 def initialize super 'classpath', "Given a Gemfile, returns the classpath necessary to satisfy dependencies" @cp_builder = JavaGems::ClasspathBuilder.new end |
Instance Attribute Details
#cp_builder ⇒ Object (readonly)
Returns the value of attribute cp_builder.
7 8 9 |
# File 'lib/rubygems/commands/classpath_command.rb', line 7 def cp_builder @cp_builder end |
Instance Method Details
#execute ⇒ Object
18 19 20 21 22 23 |
# File 'lib/rubygems/commands/classpath_command.rb', line 18 def execute say(@cp_builder.classpath_for([:args].first)) rescue => e alert_error(e.) exit 1 end |
#usage ⇒ Object
14 15 16 |
# File 'lib/rubygems/commands/classpath_command.rb', line 14 def usage "#{program_name} [GEMFILE]" end |