Class: Scarlet::Slide
- Inherits:
-
Object
- Object
- Scarlet::Slide
- Defined in:
- lib/scarlet/slide.rb
Instance Attribute Summary collapse
-
#classes ⇒ Object
Returns the value of attribute classes.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#text ⇒ Object
Returns the value of attribute text.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #format!(formatter) ⇒ Object
-
#initialize ⇒ Slide
constructor
A new instance of Slide.
Constructor Details
#initialize ⇒ Slide
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
#classes ⇒ Object
Returns the value of attribute classes.
3 4 5 |
# File 'lib/scarlet/slide.rb', line 3 def classes @classes end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
4 5 6 |
# File 'lib/scarlet/slide.rb', line 4 def identifier @identifier end |
#text ⇒ Object
Returns the value of attribute text.
3 4 5 |
# File 'lib/scarlet/slide.rb', line 3 def text @text end |
#title ⇒ Object
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 |