Class: CreateSlidevPresentation

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeCreateSlidevPresentation

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_authorObject

Returns the value of attribute presentation_author.



10
11
12
# File 'lib/renuo/cli/app/create_slidev_presentation.rb', line 10

def presentation_author
  @presentation_author
end

#presentation_nameObject

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"
  print_slidev_project_commands
end