Class: Ruvi::Highlighters
- Inherits:
-
Object
- Object
- Ruvi::Highlighters
- Includes:
- Singleton
- Defined in:
- lib/highlighters.rb
Instance Attribute Summary collapse
-
#registered_highlighters ⇒ Object
Returns the value of attribute registered_highlighters.
Instance Method Summary collapse
-
#initialize ⇒ Highlighters
constructor
A new instance of Highlighters.
- #register_highlighter(highlighter) ⇒ Object
Constructor Details
#initialize ⇒ Highlighters
Returns a new instance of Highlighters.
8 9 10 |
# File 'lib/highlighters.rb', line 8 def initialize @registered_highlighters = [] end |
Instance Attribute Details
#registered_highlighters ⇒ Object
Returns the value of attribute registered_highlighters.
7 8 9 |
# File 'lib/highlighters.rb', line 7 def registered_highlighters @registered_highlighters end |
Instance Method Details
#register_highlighter(highlighter) ⇒ Object
11 12 13 |
# File 'lib/highlighters.rb', line 11 def register_highlighter highlighter @registered_highlighters << highlighter end |