Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/hermeneutics/color.rb,
lib/hermeneutics/message.rb

Direct Known Subclasses

Hermeneutics::IdList

Instance Method Summary collapse

Instance Method Details

#eat_lines(&block) ⇒ Object



34
35
36
37
38
39
40
41
42
43
# File 'lib/hermeneutics/message.rb', line 34

def eat_lines &block
  @pos ||= 0
  while @pos < length do
    begin
      self[ @pos].eat_lines &block
    ensure
      @pos += 1
    end
  end
end

#rewindObject



44
45
46
47
# File 'lib/hermeneutics/message.rb', line 44

def rewind
  each { |e| e.rewind }
  @pos = 0
end

#to_hsvObject



271
272
273
# File 'lib/hermeneutics/color.rb', line 271

def to_hsv
  Hermeneutics::Color.from_hsv *self
end

#to_rgbObject



268
269
270
# File 'lib/hermeneutics/color.rb', line 268

def to_rgb
  Hermeneutics::Color.new *self
end