Class: Md2key::Keynote
- Inherits:
-
Object
- Object
- Md2key::Keynote
- Defined in:
- lib/md2key/keynote.rb
Class Method Summary collapse
- .activate ⇒ Object
- .create_slide(title, content) ⇒ Object
-
.delete_template_slide ⇒ Object
You must provide a second slide as a template slide.
-
.update_master(title, sub) ⇒ Object
You must provide a first slide as a master slide.
Class Method Details
.activate ⇒ Object
6 7 8 9 10 |
# File 'lib/md2key/keynote.rb', line 6 def activate tell_keynote(<<-APPLE.unindent) activate APPLE end |
.create_slide(title, content) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/md2key/keynote.rb', line 34 def (title, content) tell_keynote(<<-APPLE.unindent) tell document 1 set newSlide to make new slide tell newSlide set object text of default title item to "#{title}" set object text of default body item to "#{content}" end tell end tell APPLE end |
.delete_template_slide ⇒ Object
You must provide a second slide as a template slide. It will be deleted.
26 27 28 29 30 31 32 |
# File 'lib/md2key/keynote.rb', line 26 def tell_keynote(<<-APPLE.unindent) tell document 1 delete slide 2 end tell APPLE end |
.update_master(title, sub) ⇒ Object
You must provide a first slide as a master slide.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/md2key/keynote.rb', line 13 def update_master(title, sub) tell_keynote(<<-APPLE.unindent) tell document 1 tell slide 1 set object text of default title item to "#{title}" set object text of default body item to "#{sub}" end tell end tell APPLE end |