Class: Scarlet::Slide

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSlide

Returns a new instance of Slide.



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

def initialize
  @@counter ||= 0
  @identifier = "slide-#{@@counter}"
  @@counter += 1
  @text = ""
  @classes = ""
end

Instance Attribute Details

#classesObject

Returns the value of attribute classes.



3
4
5
# File 'lib/scarlet/slide.rb', line 3

def classes
  @classes
end

#identifierObject (readonly)

Returns the value of attribute identifier.



4
5
6
# File 'lib/scarlet/slide.rb', line 4

def identifier
  @identifier
end

#textObject

Returns the value of attribute text.



3
4
5
# File 'lib/scarlet/slide.rb', line 3

def text
  @text
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/scarlet/slide.rb', line 3

def title
  @title
end

Instance Method Details

#format!(formatter) ⇒ Object



14
15
16
# File 'lib/scarlet/slide.rb', line 14

def format!(formatter)
  @text = formatter.new(self).text
end