Class: Steep::RakeTask::CommandConfiguration
- Inherits:
-
Object
- Object
- Steep::RakeTask::CommandConfiguration
show all
- Defined in:
- lib/steep/rake_task.rb
Overview
Instance Method Summary
collapse
Constructor Details
Returns a new instance of CommandConfiguration.
60
61
62
|
# File 'lib/steep/rake_task.rb', line 60
def initialize
@options = []
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, value = nil) ⇒ Object
64
65
66
67
68
69
|
# File 'lib/steep/rake_task.rb', line 64
def method_missing(name, value = nil)
option = "--#{name.to_s.gsub(/_/, '-').gsub(/=/, '')}"
option << "=#{value}" if value
self << option
end
|
Instance Method Details
#<<(value) ⇒ Object
75
76
77
78
|
# File 'lib/steep/rake_task.rb', line 75
def <<(value)
@options << value
self
end
|
#respond_to_missing?(_name) ⇒ Boolean
71
72
73
|
# File 'lib/steep/rake_task.rb', line 71
def respond_to_missing?(_name)
true
end
|
80
81
82
|
# File 'lib/steep/rake_task.rb', line 80
def to_a
@options
end
|