Class: CreateSlidevPresentation
- Inherits:
-
Object
- Object
- CreateSlidevPresentation
- Defined in:
- lib/renuo/cli/app/create_slidev_presentation.rb
Constant Summary collapse
- EXAMPLE_SLIDES_URL =
'https://raw.githubusercontent.com/renuo/slidev-theme-renuo/main/example.md'
- SLIDEV_THEME_NAME =
'renuo'
- TEMPLATE_DIRECTORY =
'templates/slidev'
Instance Attribute Summary collapse
-
#presentation_author ⇒ Object
Returns the value of attribute presentation_author.
-
#presentation_name ⇒ Object
Returns the value of attribute presentation_name.
Instance Method Summary collapse
-
#initialize ⇒ CreateSlidevPresentation
constructor
A new instance of CreateSlidevPresentation.
- #run(args) ⇒ Object
Constructor Details
#initialize ⇒ CreateSlidevPresentation
Returns a new instance of CreateSlidevPresentation.
12 13 14 15 |
# File 'lib/renuo/cli/app/create_slidev_presentation.rb', line 12 def initialize @presentation_name = nil @presentation_author = nil end |
Instance Attribute Details
#presentation_author ⇒ Object
Returns the value of attribute presentation_author.
10 11 12 |
# File 'lib/renuo/cli/app/create_slidev_presentation.rb', line 10 def @presentation_author end |
#presentation_name ⇒ Object
Returns the value of attribute presentation_name.
10 11 12 |
# File 'lib/renuo/cli/app/create_slidev_presentation.rb', line 10 def presentation_name @presentation_name end |
Instance Method Details
#run(args) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/renuo/cli/app/create_slidev_presentation.rb', line 17 def run(args) presentation_name = args[0] abort('>> No presentation name given.') unless presentation_name say '# Commands to setup Slidev project with the Renuo theme:'.colorize :green @presentation_name = presentation_name @presentation_author = args[1] || 'Renuo AG' end |