Class: Rabbit::Parser::NoteSetter

Inherits:
Object
  • Object
show all
Defined in:
lib/rabbit/parser.rb

Instance Method Summary collapse

Constructor Details

#initialize(slide) ⇒ NoteSetter

Returns a new instance of NoteSetter.


60
61
62
# File 'lib/rabbit/parser.rb', line 60

def initialize(slide)
  @slide = slide
end

Instance Method Details

#apply(element) ⇒ Object


64
65
66
67
68
# File 'lib/rabbit/parser.rb', line 64

def apply(element)
  return unless element.is_a?(Element::Paragraph)
  @slide['note'] ||= ""
  @slide['note'] << element.text
end