You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
223 B
Ruby
12 lines
223 B
Ruby
11 years ago
|
class SnapshotCreator
|
||
|
|
||
|
def create(width, height, stdout, duration)
|
||
|
terminal = Terminal.new(width, height)
|
||
|
seconds = (duration / 2).to_i
|
||
|
bytes = stdout.bytes_until(seconds)
|
||
|
|
||
|
terminal.feed(bytes)
|
||
|
end
|
||
|
|
||
|
end
|