Class: CLIntegracon::Configuration
- Inherits:
-
Object
- Object
- CLIntegracon::Configuration
- Defined in:
- lib/CLIntegracon/configuration.rb
Instance Method Summary collapse
-
#file_tree_spec_context ⇒ FileTreeSpecContext
Get the context to configure it.
-
#hook_into(test_framework) ⇒ Object
Hook this gem in a test framework by a supported adapter.
-
#method_missing(method, *args, &block) ⇒ Object
Delegate missing methods to #file_tree_spec_context.
-
#respond_to?(method) ⇒ Boolean
Take care of delegation to #file_tree_spec_context.
-
#subject ⇒ Subject
Get the subject to configure it.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
Delegate missing methods to #file_tree_spec_context
43 44 45 46 47 48 49 |
# File 'lib/CLIntegracon/configuration.rb', line 43 def method_missing(method, *args, &block) if file_tree_spec_context.respond_to?(method) file_tree_spec_context.send(method, *args, &block) else super end end |
Instance Method Details
#file_tree_spec_context ⇒ FileTreeSpecContext
Get the context to configure it
37 38 39 |
# File 'lib/CLIntegracon/configuration.rb', line 37 def file_tree_spec_context @file_tree_spec_context ||= FileTreeSpecContext.new() end |
#hook_into(test_framework) ⇒ Object
Hook this gem in a test framework by a supported adapter
66 67 68 69 70 |
# File 'lib/CLIntegracon/configuration.rb', line 66 def hook_into test_framework adapter = self.class.adapters[test_framework] raise ArgumentError.new "No adapter for test framework #{test_framework}" if adapter.nil? require adapter end |
#respond_to?(method) ⇒ Boolean
Take care of delegation to #file_tree_spec_context
53 54 55 56 57 58 59 |
# File 'lib/CLIntegracon/configuration.rb', line 53 def respond_to?(method) if file_tree_spec_context.respond_to?(method) true else super end end |