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.
17 18 19 20 |
# File 'lib/rubygems/commands/classpath_command.rb', line 17 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.
15 16 17 |
# File 'lib/rubygems/commands/classpath_command.rb', line 15 def cp_builder @cp_builder end |
Instance Method Details
#execute ⇒ Object
26 27 28 29 30 31 |
# File 'lib/rubygems/commands/classpath_command.rb', line 26 def execute print(@cp_builder.classpath_for([:args].first)) rescue => e alert_error(e.) exit 1 end |
#usage ⇒ Object
22 23 24 |
# File 'lib/rubygems/commands/classpath_command.rb', line 22 def usage "#{program_name} [GEMFILE]" end |