Class: RSpec::Core::CommandLineConfiguration
- Defined in:
- lib/rspec/core/command_line_configuration.rb
Defined Under Namespace
Classes: Autotest
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
Instance Method Summary collapse
-
#initialize(cmd) ⇒ CommandLineConfiguration
constructor
A new instance of CommandLineConfiguration.
- #run ⇒ Object
Constructor Details
#initialize(cmd) ⇒ CommandLineConfiguration
Returns a new instance of CommandLineConfiguration.
6 7 8 |
# File 'lib/rspec/core/command_line_configuration.rb', line 6 def initialize(cmd) @command = cmd end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
4 5 6 |
# File 'lib/rspec/core/command_line_configuration.rb', line 4 def command @command end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/rspec/core/command_line_configuration.rb', line 10 def run case @command when 'autotest' then Autotest.generate else raise ArgumentError, <<-MESSAGE #{"*"*50} "#{@command}" is not valid a valid argument to "rspec --configure". Supported options are: rspec --configure autotest # generates .rspec file #{"*"*50} MESSAGE end end |