Class: Madness::Rendering::Handler
- Inherits:
-
Object
- Object
- Madness::Rendering::Handler
- Defined in:
- lib/madness/rendering/handler.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#selector ⇒ Object
readonly
Returns the value of attribute selector.
Instance Method Summary collapse
-
#initialize(selector) ⇒ Handler
constructor
A new instance of Handler.
- #render(text) ⇒ Object
Constructor Details
#initialize(selector) ⇒ Handler
Returns a new instance of Handler.
14 |
# File 'lib/madness/rendering/handler.rb', line 14 def initialize(selector) = @selector = selector&.to_sym || :redcarpet |
Instance Attribute Details
#selector ⇒ Object (readonly)
Returns the value of attribute selector.
12 13 14 |
# File 'lib/madness/rendering/handler.rb', line 12 def selector @selector end |
Instance Method Details
#render(text) ⇒ Object
15 |
# File 'lib/madness/rendering/handler.rb', line 15 def render(text) = handler.render(text) |