Class: Lecture::Slide

Inherits:
Object
  • Object
show all
Defined in:
lib/lecture/slide.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

Classes: Base, Block, Center, Code, Section

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content:, format:, **options) ⇒ Slide

Returns a new instance of Slide.



7
8
9
10
11
# File 'lib/lecture/slide.rb', line 7

def initialize(content:, format:, **options)
  @content = content
  @format  = format
  @options = options
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



5
6
7
# File 'lib/lecture/slide.rb', line 5

def content
  @content
end

#formatObject

Returns the value of attribute format.



5
6
7
# File 'lib/lecture/slide.rb', line 5

def format
  @format
end

#optionsObject

Returns the value of attribute options.



5
6
7
# File 'lib/lecture/slide.rb', line 5

def options
  @options
end

Instance Method Details

#displayObject



13
14
15
# File 'lib/lecture/slide.rb', line 13

def display
  type_class.new(content: content, **options).display
end