Class: Powerpoint::Slide::Dashboard

Inherits:
Object
  • Object
show all
Includes:
Util
Defined in:
lib/powerpoint/slide/dashboard.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 = {}) ⇒ 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(options={})
  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], options
  options.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()
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



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

def data
  @data
end

#graph_1_subtitleObject (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_titleObject (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_titleObject (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_nameObject (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_pathObject (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_2Object (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_3Object (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_4Object (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

#logoObject (readonly)

Returns the value of attribute logo.



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

def 
  @logo
end

#page_numberObject (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

#subtitleObject (readonly)

Returns the value of attribute subtitle.



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

def subtitle
  @subtitle
end

#titleObject (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, )
  save_rel_xml(extract_path, index)
  save_slide_xml(extract_path, index)
end