Class: Steep::RakeTask::TaskConfiguration
- Defined in:
- lib/steep/rake_task.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize ⇒ TaskConfiguration
constructor
A new instance of TaskConfiguration.
- #method_missing(command) ⇒ Object
- #options(command) ⇒ Object
- #respond_to_missing?(name, include_private = false) ⇒ Boolean
Constructor Details
#initialize ⇒ TaskConfiguration
Returns a new instance of TaskConfiguration.
37 38 39 |
# File 'lib/steep/rake_task.rb', line 37 def initialize @commands = {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(command) ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/steep/rake_task.rb', line 41 def method_missing(command) if respond_to?(command) @commands[command] ||= CommandConfiguration.new else super end end |
Instance Method Details
#options(command) ⇒ Object
53 54 55 |
# File 'lib/steep/rake_task.rb', line 53 def (command) @commands[command]&.to_a || [] end |
#respond_to_missing?(name, include_private = false) ⇒ Boolean
49 50 51 |
# File 'lib/steep/rake_task.rb', line 49 def respond_to_missing?(name, include_private = false) RakeTask.available_commands.include?(name) || super end |