Class: Powerpoint::Slide::Dashboard
- Inherits:
-
Object
- Object
- Powerpoint::Slide::Dashboard
- Includes:
- Util
- Defined in:
- lib/powerpoint/slide/dashboard.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#graph_1_subtitle ⇒ Object
readonly
Returns the value of attribute graph_1_subtitle.
-
#graph_1_title ⇒ Object
readonly
Returns the value of attribute graph_1_title.
-
#graph_2_title ⇒ Object
readonly
Returns the value of attribute graph_2_title.
-
#image_name ⇒ Object
readonly
Returns the value of attribute image_name.
-
#image_path ⇒ Object
readonly
Returns the value of attribute image_path.
-
#image_path_2 ⇒ Object
readonly
Returns the value of attribute image_path_2.
-
#image_path_3 ⇒ Object
readonly
Returns the value of attribute image_path_3.
-
#image_path_4 ⇒ Object
readonly
Returns the value of attribute image_path_4.
-
#logo ⇒ Object
readonly
Returns the value of attribute logo.
-
#page_number ⇒ Object
readonly
Returns the value of attribute page_number.
-
#subtitle ⇒ Object
readonly
Returns the value of attribute subtitle.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Dashboard
constructor
A new instance of Dashboard.
- #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 = {}) ⇒ Dashboard
Returns a new instance of Dashboard.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/powerpoint/slide/dashboard.rb', line 13 def initialize(={}) require_arguments [:title, :subtitle,:page_number, :graph_1_title, :graph_1_subtitle, :graph_2_title, :image_path, :image_path_2,:image_path_3, :image_path_4, :logo, :data], .each {|k, v| instance_variable_set("@#{k}", v)} @data = data @image_name = File.basename(image_path) @image_name_2 = File.basename(image_path_2) @image_name_3 = File.basename(image_path_3) @image_name_4 = File.basename(image_path_4) @logo_name = File.basename(logo) end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
11 12 13 |
# File 'lib/powerpoint/slide/dashboard.rb', line 11 def data @data end |
#graph_1_subtitle ⇒ Object (readonly)
Returns the value of attribute graph_1_subtitle.
11 12 13 |
# File 'lib/powerpoint/slide/dashboard.rb', line 11 def graph_1_subtitle @graph_1_subtitle end |
#graph_1_title ⇒ Object (readonly)
Returns the value of attribute graph_1_title.
11 12 13 |
# File 'lib/powerpoint/slide/dashboard.rb', line 11 def graph_1_title @graph_1_title end |
#graph_2_title ⇒ Object (readonly)
Returns the value of attribute graph_2_title.
11 12 13 |
# File 'lib/powerpoint/slide/dashboard.rb', line 11 def graph_2_title @graph_2_title end |
#image_name ⇒ Object (readonly)
Returns the value of attribute image_name.
11 12 13 |
# File 'lib/powerpoint/slide/dashboard.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/dashboard.rb', line 11 def image_path @image_path end |
#image_path_2 ⇒ Object (readonly)
Returns the value of attribute image_path_2.
11 12 13 |
# File 'lib/powerpoint/slide/dashboard.rb', line 11 def image_path_2 @image_path_2 end |
#image_path_3 ⇒ Object (readonly)
Returns the value of attribute image_path_3.
11 12 13 |
# File 'lib/powerpoint/slide/dashboard.rb', line 11 def image_path_3 @image_path_3 end |
#image_path_4 ⇒ Object (readonly)
Returns the value of attribute image_path_4.
11 12 13 |
# File 'lib/powerpoint/slide/dashboard.rb', line 11 def image_path_4 @image_path_4 end |
#logo ⇒ Object (readonly)
Returns the value of attribute logo.
11 12 13 |
# File 'lib/powerpoint/slide/dashboard.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/dashboard.rb', line 11 def page_number @page_number end |
#subtitle ⇒ Object (readonly)
Returns the value of attribute subtitle.
11 12 13 |
# File 'lib/powerpoint/slide/dashboard.rb', line 11 def subtitle @subtitle end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
11 12 13 |
# File 'lib/powerpoint/slide/dashboard.rb', line 11 def title @title end |
Instance Method Details
#save(extract_path, index) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/powerpoint/slide/dashboard.rb', line 24 def save(extract_path, index) copy_media(extract_path, image_path) copy_media(extract_path, image_path_2) copy_media(extract_path, image_path_3) copy_media(extract_path, image_path_4) copy_media(extract_path, logo) save_rel_xml(extract_path, index) (extract_path, index) end |