Class: Nopoint::Slide
- Inherits:
-
Object
- Object
- Nopoint::Slide
- Defined in:
- lib/nopoint/slide.rb
Instance Attribute Summary collapse
-
#comments ⇒ Object
Returns the value of attribute comments.
-
#content ⇒ Object
Returns the value of attribute content.
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(id, source) ⇒ Slide
constructor
A new instance of Slide.
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
#comments ⇒ Object
Returns the value of attribute comments.
5 6 7 |
# File 'lib/nopoint/slide.rb', line 5 def comments @comments end |
#content ⇒ Object
Returns the value of attribute content.
5 6 7 |
# File 'lib/nopoint/slide.rb', line 5 def content @content end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/nopoint/slide.rb', line 5 def id @id end |