class Showoff::Slide

todo: move more behavior into this class

Attributes

bg[R]
classes[R]
text[R]
tpl[R]

Public Class Methods

new( context = "") click to toggle source
# File lib/showoff.rb, line 365
def initialize( context = "")

  @tpl = "default"
  @classes = []

  # Parse the context string for options and content classes
  if context and context.match(/(\[(.*?)\])?(.*)/)
    options = ShowoffUtils.parse_options($2)
    @tpl = options["tpl"] if options["tpl"]
    @bg = options["bg"] if options["bg"]
    @classes += $3.strip.chomp('>').split if $3
  end

  @text = ""
end

Public Instance Methods

<<(s) click to toggle source
# File lib/showoff.rb, line 380
def <<(s)
  @text << s
  @text << "\n"
end
empty?() click to toggle source
# File lib/showoff.rb, line 384
def empty?
  @text.strip == ""
end