Class: Odf::Component::ImageSet

Inherits:
Abstract
  • Object
show all
Defined in:
lib/odf/component/image_set.rb

Defined Under Namespace

Classes: Image

Instance Attribute Summary collapse

Attributes inherited from Abstract

#document

Instance Method Summary collapse

Methods inherited from Abstract

#content, #inspect, #name

Constructor Details

#initialize(*args) ⇒ ImageSet

Returns a new instance of ImageSet.



24
25
26
27
# File 'lib/odf/component/image_set.rb', line 24

def initialize(*args)
  super
  @images = Set.new
end

Instance Attribute Details

#imagesObject (readonly)

Returns the value of attribute images.



22
23
24
# File 'lib/odf/component/image_set.rb', line 22

def images
  @images
end

Instance Method Details

#<<(path) ⇒ Object



29
30
31
32
33
# File 'lib/odf/component/image_set.rb', line 29

def <<(path)
  image = Image.new(path)
  images << image
  image.path
end

#each(&block) ⇒ Object



35
36
37
38
39
# File 'lib/odf/component/image_set.rb', line 35

def each(&block)
  images.each do |image|
    block.call(image)
  end
end