Class: String
- Inherits:
-
Object
show all
- Defined in:
- lib/hermeneutics/color.rb,
lib/hermeneutics/message.rb
Instance Method Summary
collapse
Instance Method Details
#eat_lines ⇒ Object
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/hermeneutics/message.rb', line 17
def eat_lines
@pos ||= 0
while @pos < length do
p = index /.*\n?/, @pos
l = $&.length
begin
yield self[ @pos, l]
ensure
@pos += l
end
end
end
|
#rewind ⇒ Object
29
30
31
|
# File 'lib/hermeneutics/message.rb', line 29
def rewind
@pos = 0
end
|
#to_gray ⇒ Object
Also known as:
to_grey
258
259
260
|
# File 'lib/hermeneutics/color.rb', line 258
def to_gray
(Integer self).to_gray
end
|