Class: Toga::Commands::Top
- Inherits:
-
Toga::Command
- Object
- Toga::Command
- Toga::Commands::Top
- Defined in:
- lib/toga/commands/top.rb
Direct Known Subclasses
Class Method Summary collapse
Methods included from Error
Class Method Details
.run!(*args) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/toga/commands/top.rb', line 5 def self.run!(*args) # Move the given task to the top of the group if args.first && args.first.count > 0 Togafile.promote(args.first.join(' ')) end lines = Togafile.lines_in_group(:current) lines.shift lines.delete_if {|l| l.strip.length == 0 } lines.first end |