stty 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/stty.rb +14 -5
- metadata +3 -3
data/lib/stty.rb
CHANGED
@@ -378,15 +378,24 @@ module STTY
|
|
378
378
|
end
|
379
379
|
end
|
380
380
|
|
381
|
-
def cols
|
382
|
-
|
381
|
+
def cols
|
382
|
+
self.size[1]
|
383
|
+
end
|
384
|
+
alias columns cols
|
385
|
+
|
386
|
+
def rows
|
387
|
+
self.size[0]
|
388
|
+
end
|
389
|
+
|
390
|
+
def cols=(n)
|
391
|
+
data = [self.rows, n, 0, 0].pack('SSSS')
|
383
392
|
|
384
393
|
self.ioctl(TIOCSWINSZ, data) >= 0 ? true : false
|
385
394
|
end
|
386
|
-
alias columns cols
|
395
|
+
alias columns= cols=
|
387
396
|
|
388
|
-
def rows(n)
|
389
|
-
data = [n, self.
|
397
|
+
def rows=(n)
|
398
|
+
data = [n, self.cols, 0, 0].pack('SSSS')
|
390
399
|
|
391
400
|
self.ioctl(TIOCSWINSZ, data) >= 0 ? true : false
|
392
401
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- shura
|
@@ -18,7 +18,7 @@ date: 2011-06-01 00:00:00 +02:00
|
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
name: termios
|
21
|
+
name: ruby-termios
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|