Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/drydock/mixins/object.rb
Instance Method Summary collapse
-
#tput(capnam, *args) ⇒ Object
Executes tput
capnam
withargs
. -
#tput_val(capnam, *args) ⇒ Object
Executes tput
capnam
withargs
.
Instance Method Details
#tput(capnam, *args) ⇒ Object
Executes tput capnam
with args
. Returns true if tcap gives 0 exit status and false otherwise.
tput :cup, 1, 4
$ tput cup 1 4
9 10 11 |
# File 'lib/drydock/mixins/object.rb', line 9 def tput(capnam, *args) system("tput #{capnam} #{args.flatten.join(' ')}") end |
#tput_val(capnam, *args) ⇒ Object
Executes tput capnam
with args
. Returns the output of tput.
tput_val :cols # => 16
$ tput cols # => 16
18 19 20 |
# File 'lib/drydock/mixins/object.rb', line 18 def tput_val(capnam, *args) `tput #{capnam} #{args.flatten.join(' ')}`.chomp end |