Class: Powerpoint::Slide::TextPicSplit
- Inherits:
-
Object
- Object
- Powerpoint::Slide::TextPicSplit
- Includes:
- Util
- Defined in:
- lib/powerpoint/slide/text_picture_split.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#coords ⇒ Object
readonly
Returns the value of attribute coords.
-
#image_name ⇒ Object
readonly
Returns the value of attribute image_name.
-
#image_path ⇒ Object
readonly
Returns the value of attribute image_path.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #file_type ⇒ Object
-
#initialize(options = {}) ⇒ TextPicSplit
constructor
A new instance of TextPicSplit.
- #save(extract_path, index) ⇒ Object
Methods included from Util
#copy_media, #pixle_to_pt, #read_template, #render_view, #require_arguments
Constructor Details
#initialize(options = {}) ⇒ TextPicSplit
Returns a new instance of TextPicSplit.
13 14 15 16 17 18 |
# File 'lib/powerpoint/slide/text_picture_split.rb', line 13 def initialize(={}) require_arguments [:presentation, :title, :image_path, :content], .each {|k, v| instance_variable_set("@#{k}", v)} @coords = default_coords @image_name = File.basename(@image_path) end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
11 12 13 |
# File 'lib/powerpoint/slide/text_picture_split.rb', line 11 def content @content end |
#coords ⇒ Object (readonly)
Returns the value of attribute coords.
11 12 13 |
# File 'lib/powerpoint/slide/text_picture_split.rb', line 11 def coords @coords end |
#image_name ⇒ Object (readonly)
Returns the value of attribute image_name.
11 12 13 |
# File 'lib/powerpoint/slide/text_picture_split.rb', line 11 def image_name @image_name end |
#image_path ⇒ Object (readonly)
Returns the value of attribute image_path.
11 12 13 |
# File 'lib/powerpoint/slide/text_picture_split.rb', line 11 def image_path @image_path end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
11 12 13 |
# File 'lib/powerpoint/slide/text_picture_split.rb', line 11 def title @title end |
Instance Method Details
#file_type ⇒ Object
26 27 28 |
# File 'lib/powerpoint/slide/text_picture_split.rb', line 26 def file_type File.extname(image_name).gsub('.', '') end |
#save(extract_path, index) ⇒ Object
20 21 22 23 24 |
# File 'lib/powerpoint/slide/text_picture_split.rb', line 20 def save(extract_path, index) copy_media(extract_path, @image_path) save_rel_xml(extract_path, index) (extract_path, index) end |