Module: Capybara::AsyncRunner::Commands::Configuration::ClassMethods
- Defined in:
- lib/capybara/async_runner/commands/configuration.rb
Instance Method Summary collapse
-
#command_name ⇒ String, Symbol
Returns configured command name or raises error.
-
#command_name=(command_name) ⇒ Object
Saves provided
command_name
. -
#file_to_run ⇒ String, Symbol
Returns configured filepath or raises error.
-
#file_to_run=(file_to_run) ⇒ Object
Stores provided relative
file_to_run
(don’t include directory and extension). -
#inherited(klass) ⇒ Object
Inherits all configuration from parent.
Instance Method Details
#command_name ⇒ String, Symbol
Returns configured command name or raises error
23 24 25 26 |
# File 'lib/capybara/async_runner/commands/configuration.rb', line 23 def command_name store[:command_name] or raise NotImplementedError, "You need to define self.command_name = ... in #{self}" end |
#command_name=(command_name) ⇒ Object
Saves provided command_name
32 33 34 |
# File 'lib/capybara/async_runner/commands/configuration.rb', line 32 def command_name=(command_name) store[:command_name] = command_name end |
#file_to_run ⇒ String, Symbol
Returns configured filepath or raises error
42 43 44 45 |
# File 'lib/capybara/async_runner/commands/configuration.rb', line 42 def file_to_run store[:file_to_run] or raise NotImplementedError, "You need to define self.file_to_run = ... in #{self}" end |
#file_to_run=(file_to_run) ⇒ Object
Stores provided relative file_to_run
(don’t include directory and extension)
51 52 53 |
# File 'lib/capybara/async_runner/commands/configuration.rb', line 51 def file_to_run=(file_to_run) store[:file_to_run] = file_to_run end |
#inherited(klass) ⇒ Object
Inherits all configuration from parent
59 60 61 62 63 64 |
# File 'lib/capybara/async_runner/commands/configuration.rb', line 59 def inherited(klass) super return if self == Capybara::AsyncRunner::Command klass.command_name = self.command_name klass.file_to_run = self.file_to_run end |