Class: Powerpoint::Slide::ExtendedIntro

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/powerpoint/slide/extended_intro.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Util

#copy_media, #merge_variables, #pixle_to_pt, #read_template, #render_view, #require_arguments

Constructor Details

#initialize(options = {}) ⇒ ExtendedIntro

Returns a new instance of ExtendedIntro.



13
14
15
16
17
18
# File 'lib/powerpoint/slide/extended_intro.rb', line 13

def initialize(options={})
  require_arguments [:title, :subtitle, :image_path, :image_path_2, :subtitle_2], options
  options.each {|k, v| instance_variable_set("@#{k}", v)}
  @image_name = File.basename(@image_path)
  @image_name_2 = File.basename(@image_path_2)
end

Instance Attribute Details

#coordsObject (readonly)

Returns the value of attribute coords.



11
12
13
# File 'lib/powerpoint/slide/extended_intro.rb', line 11

def coords
  @coords
end

#image_nameObject (readonly)

Returns the value of attribute image_name.



11
12
13
# File 'lib/powerpoint/slide/extended_intro.rb', line 11

def image_name
  @image_name
end

#image_pathObject (readonly)

Returns the value of attribute image_path.



11
12
13
# File 'lib/powerpoint/slide/extended_intro.rb', line 11

def image_path
  @image_path
end

#image_path_2Object (readonly)

Returns the value of attribute image_path_2.



11
12
13
# File 'lib/powerpoint/slide/extended_intro.rb', line 11

def image_path_2
  @image_path_2
end

#subtitleObject (readonly)

Returns the value of attribute subtitle.



11
12
13
# File 'lib/powerpoint/slide/extended_intro.rb', line 11

def subtitle
  @subtitle
end

#subtitle_2Object (readonly)

Returns the value of attribute subtitle_2.



11
12
13
# File 'lib/powerpoint/slide/extended_intro.rb', line 11

def subtitle_2
  @subtitle_2
end

#titleObject (readonly)

Returns the value of attribute title.



11
12
13
# File 'lib/powerpoint/slide/extended_intro.rb', line 11

def title
  @title
end

Instance Method Details

#save(extract_path, index) ⇒ Object



20
21
22
23
24
25
# File 'lib/powerpoint/slide/extended_intro.rb', line 20

def save(extract_path, index)
  copy_media(extract_path, @image_path)
  copy_media(extract_path, @image_path_2)
  save_rel_xml(extract_path, index)
  save_slide_xml(extract_path, index)
end