Class: SlideHero::Point
- Inherits:
-
Object
- Object
- SlideHero::Point
- 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
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #compile ⇒ Object
-
#initialize(text, animation: nil) ⇒ Point
constructor
A new instance of Point.
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
#text ⇒ Object (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
#compile ⇒ Object
12 13 14 |
# File 'lib/slide_hero/point.rb', line 12 def compile "<p#{animation}>#{text}</p>" end |