Class: Sake::TasksArray
- Inherits:
-
Array
- Object
- Array
- Sake::TasksArray
- Defined in:
- lib/sake.rb
Overview
Instance Method Summary collapse
- #[](name_or_index) ⇒ Object
-
#to_ruby ⇒ Object
The source of all these tasks.
Instance Method Details
#[](name_or_index) ⇒ Object
270 271 272 273 274 275 276 |
# File 'lib/sake.rb', line 270 def [](name_or_index) if name_or_index.is_a? String detect { |task| task.name == name_or_index } else super end end |
#to_ruby ⇒ Object
The source of all these tasks.
280 281 282 |
# File 'lib/sake.rb', line 280 def to_ruby map { |task| task.to_ruby }.join("\n") end |