Class: Rays::Video

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/rays/video.rb

Instance Method Summary collapse

Constructor Details

#initialize(width, height, fps: 0, pixel_density: 1, &block) ⇒ Video

Returns a new instance of Video.



14
15
16
17
# File 'lib/rays/video.rb', line 14

def initialize(width, height, fps: 0, pixel_density: 1, &block)
  initialize! width, height, fps, pixel_density
  Xot::BlockUtil.instance_eval_or_block_call self, &block if block
end

Instance Method Details

#append(*images) ⇒ Object



23
24
25
# File 'lib/rays/video.rb', line 23

def append(*images)
  images.each {|image| append! image}
end

#each(&block) ⇒ Object



37
38
39
40
# File 'lib/rays/video.rb', line 37

def each(&block)
  return enum_for :each unless block
  each!(&block)
end

#insert(index, *images) ⇒ Object



19
20
21
# File 'lib/rays/video.rb', line 19

def insert(index, *images)
  images.each.with_index {|image, i| insert! index + i, image}
end

#remove(index_or_range) ⇒ Object



27
28
29
30
31
32
# File 'lib/rays/video.rb', line 27

def remove(index_or_range)
  case index_or_range
  when Range then raise NotImplementedError
  else remove! index_or_range
  end
end