Class: SlideHero::Point

Inherits:
Object
  • Object
show all
Defined in:
lib/slide_hero/point.rb

Constant Summary collapse

SUPPORTED_ANIMATIONS =
%w{grow shrink roll-in fade-out 
highlight-red highlight-green highlight-blue}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text, animation: nil) ⇒ Point

Returns a new instance of Point.



7
8
9
10
# File 'lib/slide_hero/point.rb', line 7

def initialize(text, animation: nil)
  @text = text
  @animation = animation
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



3
4
5
# File 'lib/slide_hero/point.rb', line 3

def text
  @text
end

Instance Method Details

#compileObject



12
13
14
# File 'lib/slide_hero/point.rb', line 12

def compile
  "<p#{animation}>#{text}</p>"
end