Class: Nopoint::Slide

Inherits:
Object
  • Object
show all
Defined in:
lib/nopoint/slide.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, source) ⇒ Slide

Returns a new instance of Slide.



7
8
9
10
11
12
13
# File 'lib/nopoint/slide.rb', line 7

def initialize(id, source)
  @id = id
  notes = /\/\/ .*/
  @comments = source.match(notes)
  markdown = source.sub(notes, '')
  @content = Kramdown::Document.new(markdown).to_html
end

Instance Attribute Details

#commentsObject

Returns the value of attribute comments.



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

def comments
  @comments
end

#contentObject

Returns the value of attribute content.



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

def content
  @content
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end