Class: Powerpoint::Slide::Gallery
- Inherits:
-
Object
- Object
- Powerpoint::Slide::Gallery
- Includes:
- Util
- Defined in:
- lib/powerpoint/slide/gallery.rb
Instance Attribute Summary collapse
-
#images ⇒ Object
readonly
Returns the value of attribute images.
-
#logo ⇒ Object
readonly
Returns the value of attribute logo.
-
#page_number ⇒ Object
readonly
Returns the value of attribute page_number.
-
#question ⇒ Object
readonly
Returns the value of attribute question.
-
#subtitle ⇒ Object
readonly
Returns the value of attribute subtitle.
-
#task_icon ⇒ Object
readonly
Returns the value of attribute task_icon.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Gallery
constructor
A new instance of Gallery.
- #save(extract_path, index) ⇒ Object
Methods included from Util
#copy_media, #merge_variables, #pixle_to_pt, #read_template, #render_view, #require_arguments
Constructor Details
#initialize(options = {}) ⇒ Gallery
Returns a new instance of Gallery.
13 14 15 16 17 |
# File 'lib/powerpoint/slide/gallery.rb', line 13 def initialize(={}) require_arguments [:title, :subtitle, :question, :page_number, :logo, :task_icon, :images], .each {|k, v| instance_variable_set("@#{k}", v)} @images = images end |
Instance Attribute Details
#images ⇒ Object (readonly)
Returns the value of attribute images.
11 12 13 |
# File 'lib/powerpoint/slide/gallery.rb', line 11 def images @images end |
#logo ⇒ Object (readonly)
Returns the value of attribute logo.
11 12 13 |
# File 'lib/powerpoint/slide/gallery.rb', line 11 def logo @logo end |
#page_number ⇒ Object (readonly)
Returns the value of attribute page_number.
11 12 13 |
# File 'lib/powerpoint/slide/gallery.rb', line 11 def page_number @page_number end |
#question ⇒ Object (readonly)
Returns the value of attribute question.
11 12 13 |
# File 'lib/powerpoint/slide/gallery.rb', line 11 def question @question end |
#subtitle ⇒ Object (readonly)
Returns the value of attribute subtitle.
11 12 13 |
# File 'lib/powerpoint/slide/gallery.rb', line 11 def subtitle @subtitle end |
#task_icon ⇒ Object (readonly)
Returns the value of attribute task_icon.
11 12 13 |
# File 'lib/powerpoint/slide/gallery.rb', line 11 def task_icon @task_icon end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
11 12 13 |
# File 'lib/powerpoint/slide/gallery.rb', line 11 def title @title end |
Instance Method Details
#save(extract_path, index) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/powerpoint/slide/gallery.rb', line 19 def save(extract_path, index) @images.each do |image| copy_media(extract_path, image[0]) end copy_media(extract_path, logo) copy_media(extract_path, task_icon) save_rel_xml(extract_path, index) (extract_path, index) end |