Skip to content
Browse files

Remove whitespace [Gun.io WhitespaceBot]

  • Loading branch information...
1 parent f4ac4ce commit 5874965d5b9e86ceeabf77faef539fbfbab74d47 Gun.io Whitespace Robot committed Oct 28, 2011
Showing with 12 additions and 12 deletions.
  1. +2 −2 help/resizing.dhf
  2. +3 −3 lib/diakonos/ctag.rb
  3. +7 −7 lib/diakonos/sized-array.rb
View
4 help/resizing.dhf
@@ -11,9 +11,9 @@ Diakonos:
shopt -s checkwinsize
Read more about the shopt built-in command here:
-
+
http://linux.about.com/library/cmd/blcmdl1_shopt.htm
Pressing <Ctrl-Alt-R> will force Diakonos to redraw itself.
-
+
Tags: bash size resize resizing window terminal console change draw redraw problem problems troubleshoot troubleshooting issue issues
View
6 lib/diakonos/ctag.rb
@@ -2,18 +2,18 @@ module Diakonos
class CTag
attr_reader :file, :command, :kind, :rest
-
+
def initialize( file, command, kind, rest )
@file = file
@command = command
@kind = kind
@rest = rest
end
-
+
def to_s
"#{@file}:#{@command} (#{@kind}) #{@rest}"
end
-
+
def == ( other )
(
other and
View
14 lib/diakonos/sized-array.rb
@@ -1,42 +1,42 @@
class SizedArray < Array
attr_reader :capacity
-
+
def initialize( capacity = 10, *args )
@capacity = capacity
super( *args )
end
-
+
def resize
if size > @capacity
slice!( (0...-@capacity) )
end
end
private :resize
-
+
def concat( other_array )
super( other_array )
resize
self
end
-
+
def fill( *args )
retval = super( *args )
resize
self
end
-
+
def <<( item )
retval = super( item )
if size > @capacity
retval = shift
end
retval
end
-
+
def push( item )
self << item
end
-
+
def unshift( item )
retval = super( item )
if size > @capacity

0 comments on commit 5874965

Please sign in to comment.
Something went wrong with that request. Please try again.