Class: InfuseDSL
Instance Attribute Summary collapse
-
#author ⇒ Object
Specified.
-
#background ⇒ Object
Specified.
-
#company ⇒ Object
Specified.
-
#copyright ⇒ Object
Specified.
-
#format ⇒ Object
Specified.
-
#output_dir ⇒ Object
Derived.
-
#slides ⇒ Object
Specified.
-
#source_file ⇒ Object
Derived.
-
#subtitle ⇒ Object
Specified.
-
#title ⇒ Object
Specified.
-
#transition ⇒ Object
Specified.
Instance Method Summary collapse
- #add_slide(slide) ⇒ Object
-
#initialize ⇒ InfuseDSL
constructor
A new instance of InfuseDSL.
- #run ⇒ Object
Constructor Details
#initialize ⇒ InfuseDSL
Returns a new instance of InfuseDSL.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/infuse/infuse_dsl.rb', line 11 def initialize = [] @template_dir = File.dirname(__FILE__) + "/themes/plain/" @operashow_templates = { :header => "operashow-header.html.erb", :footer => "operashow-footer.html.erb", :slide => "slide.html.erb", :title_slide => "title-page.html.erb" } @html_templates = { :header => "header.html.erb", :footer => "footer.html.erb", :slide => "slide.html.erb", :title_slide => "title-page.html.erb" } end |
Instance Attribute Details
#author ⇒ Object
Specified
7 8 9 |
# File 'lib/infuse/infuse_dsl.rb', line 7 def end |
#background ⇒ Object
Specified
7 8 9 |
# File 'lib/infuse/infuse_dsl.rb', line 7 def background @background end |
#company ⇒ Object
Specified
7 8 9 |
# File 'lib/infuse/infuse_dsl.rb', line 7 def company @company end |
#copyright ⇒ Object
Specified
7 8 9 |
# File 'lib/infuse/infuse_dsl.rb', line 7 def copyright @copyright end |
#format ⇒ Object
Specified
7 8 9 |
# File 'lib/infuse/infuse_dsl.rb', line 7 def format @format end |
#output_dir ⇒ Object
Derived
9 10 11 |
# File 'lib/infuse/infuse_dsl.rb', line 9 def output_dir @output_dir end |
#slides ⇒ Object
Specified
7 8 9 |
# File 'lib/infuse/infuse_dsl.rb', line 7 def end |
#source_file ⇒ Object
Derived
9 10 11 |
# File 'lib/infuse/infuse_dsl.rb', line 9 def source_file @source_file end |
#subtitle ⇒ Object
Specified
7 8 9 |
# File 'lib/infuse/infuse_dsl.rb', line 7 def subtitle @subtitle end |
#title ⇒ Object
Specified
7 8 9 |
# File 'lib/infuse/infuse_dsl.rb', line 7 def title @title end |
#transition ⇒ Object
Specified
7 8 9 |
# File 'lib/infuse/infuse_dsl.rb', line 7 def transition @transition end |
Instance Method Details
#add_slide(slide) ⇒ Object
30 31 32 |
# File 'lib/infuse/infuse_dsl.rb', line 30 def () << end |
#run ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/infuse/infuse_dsl.rb', line 34 def run html_output = (@html_templates) operashow_output = (@operashow_templates) prepare_target_dir begin File.new(output_file, "w").puts(html_output) File.new(output_file('operashow-'), "w").puts(operashow_output) rescue puts $! exit end end |