Class: Steep::RakeTask::TaskConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/steep/rake_task.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initializeTaskConfiguration

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 options(command)
  @commands[command]&.to_a || []
end

#respond_to_missing?(name, include_private = false) ⇒ Boolean

Returns:

  • (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