Use 1.9 compatible method to compute frame length
This commit is contained in:
parent
bc8ccb6b54
commit
9af927befb
2 changed files with 2 additions and 3 deletions
|
@ -4,6 +4,7 @@ module Mutant
|
|||
class CLI < self
|
||||
include Concord.new(:output)
|
||||
|
||||
NL = "\n".freeze
|
||||
CLEAR_PREV_LINE = "\e[1A\e[2K".freeze
|
||||
|
||||
# Output abstraction to decouple tty? from buffer
|
||||
|
@ -112,7 +113,7 @@ module Mutant
|
|||
#
|
||||
def swap(frame)
|
||||
output.write(frame)
|
||||
@last_length = frame.lines.length
|
||||
@last_length = frame.split(NL).length
|
||||
end
|
||||
|
||||
# Call block throttled
|
||||
|
|
|
@ -5,8 +5,6 @@ module Mutant
|
|||
class Printer
|
||||
include AbstractType, Delegator, Adamantium::Flat, Concord.new(:output, :object)
|
||||
|
||||
NL = "\n".freeze
|
||||
|
||||
# Run printer on object to output
|
||||
#
|
||||
# @param [IO] output
|
||||
|
|
Loading…
Reference in a new issue