Class: Odf::Component::ImageSet
- Defined in:
- lib/odf/component/image_set.rb
Defined Under Namespace
Classes: Image
Instance Attribute Summary collapse
-
#images ⇒ Object
readonly
Returns the value of attribute images.
Attributes inherited from Abstract
Instance Method Summary collapse
- #<<(path) ⇒ Object
- #each(&block) ⇒ Object
-
#initialize(*args) ⇒ ImageSet
constructor
A new instance of ImageSet.
Methods inherited from Abstract
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
#images ⇒ Object (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 |