Class: Select::Buffer

Inherits:
String
  • Object
show all
Defined in:
lib/select.rb

Instance Method Summary collapse

Instance Method Details

#+(s) ⇒ Object


222
223
224
# File 'lib/select.rb', line 222

def + s
	self.class.new super(s)
end

#each!(x) ⇒ Object


215
216
217
218
219
220
# File 'lib/select.rb', line 215

def each! x
	return Enumerator.new( self, :each!, x)  unless block_given?
	s = nil
	yield s  while s = self.slice!( x)
	self
end

#inspectObject


206
207
208
# File 'lib/select.rb', line 206

def inspect
	"#<Buffer:#{super}>"
end

#remove(x) ⇒ Object Also known as: remove!


210
211
212
# File 'lib/select.rb', line 210

def remove x
	self.slice! 0...x
end