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.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/infuse/infuse_dsl.rb', line 12 def initialize @slides = [] @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
8 9 10 |
# File 'lib/infuse/infuse_dsl.rb', line 8 def @author end |
#background ⇒ Object
Specified
8 9 10 |
# File 'lib/infuse/infuse_dsl.rb', line 8 def background @background end |
#company ⇒ Object
Specified
8 9 10 |
# File 'lib/infuse/infuse_dsl.rb', line 8 def company @company end |
#copyright ⇒ Object
Specified
8 9 10 |
# File 'lib/infuse/infuse_dsl.rb', line 8 def copyright @copyright end |
#format ⇒ Object
Specified
8 9 10 |
# File 'lib/infuse/infuse_dsl.rb', line 8 def format @format end |
#output_dir ⇒ Object
Derived
10 11 12 |
# File 'lib/infuse/infuse_dsl.rb', line 10 def output_dir @output_dir end |
#slides ⇒ Object
Specified
8 9 10 |
# File 'lib/infuse/infuse_dsl.rb', line 8 def @slides end |
#source_file ⇒ Object
Derived
10 11 12 |
# File 'lib/infuse/infuse_dsl.rb', line 10 def source_file @source_file end |
#subtitle ⇒ Object
Specified
8 9 10 |
# File 'lib/infuse/infuse_dsl.rb', line 8 def subtitle @subtitle end |
#title ⇒ Object
Specified
8 9 10 |
# File 'lib/infuse/infuse_dsl.rb', line 8 def title @title end |
#transition ⇒ Object
Specified
8 9 10 |
# File 'lib/infuse/infuse_dsl.rb', line 8 def transition @transition end |
Instance Method Details
#add_slide(slide) ⇒ Object
31 32 33 |
# File 'lib/infuse/infuse_dsl.rb', line 31 def () @slides << end |
#run ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/infuse/infuse_dsl.rb', line 35 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 |