Module: Lecture

Defined in:
lib/lecture.rb,
lib/lecture/slide.rb,
lib/lecture/config.rb,
lib/lecture/runner.rb,
lib/lecture/version.rb,
lib/lecture/terminal.rb,
lib/lecture/slide/base.rb,
lib/lecture/slide/code.rb,
lib/lecture/slide/block.rb,
lib/lecture/slide/center.rb,
lib/lecture/slide/section.rb

Defined Under Namespace

Modules: Terminal Classes: Config, Runner, Slide

Constant Summary collapse

HELP =
<<~HELP
  #{'VERSION'.bold} #{Lecture::VERSION}

  #{'NAME'.bold}
    lecture - Terminal Slideshow

  #{'SYNOPSIS'.bold}
    lecture [--help] <slides>.rb

  #{'OPTIONS'.bold}
    -h, --help
       Print this help

  #{'COMMANDS'.bold}
    Next slide:        SPC, Right Arrow
    Previous slide:    Left Arrow
    First slide:       a
    Last slide:        d
    Jump to slide:     j
    Reload slide:      w
    Quit:              q

  #{'SLIDE TYPES'.bold}
    code               Highlighted block of code
    center             All lines are centered on the screen
    block              The section of text is centered as whole
    section            A stylized section identifier slide
HELP
VERSION =
"1.0.0"

Class Method Summary collapse

Class Method Details

.available_colorsObject



41
42
43
# File 'lib/lecture.rb', line 41

def self.available_colors
  String.colors
end

.available_modesObject



45
46
47
# File 'lib/lecture.rb', line 45

def self.available_modes
  String.modes
end

.character_print_delayObject



17
18
19
# File 'lib/lecture.rb', line 17

def self.character_print_delay
  @@character_print_delay || 0.018
end

.execute(deck) ⇒ Object



49
50
51
# File 'lib/lecture.rb', line 49

def self.execute(deck)
  Runner.new(deck).execute
end

.pygment_styleObject



25
26
27
# File 'lib/lecture.rb', line 25

def self.pygment_style
  @@pygment_style || "paraiso-dark"
end


37
38
39
# File 'lib/lecture.rb', line 37

def self.
  @@section_footer_text ||= " § "
end

.section_header_textObject



33
34
35
# File 'lib/lecture.rb', line 33

def self.section_header_text
  @@section_header_text ||= " § "
end

.slide_typesObject



29
30
31
# File 'lib/lecture.rb', line 29

def self.slide_types
  @@slide_types ||= Set.new
end

.transition_timeObject



21
22
23
# File 'lib/lecture.rb', line 21

def self.transition_time
  @@transition_time || 0.3
end