Class: Shortcodes::Handler
- Inherits:
-
Object
- Object
- Shortcodes::Handler
- Defined in:
- lib/shortcodes/handler.rb
Overview
Abstract Handler
Instance Attribute Summary collapse
-
#shortcode ⇒ Object
readonly
Returns the value of attribute shortcode.
Class Method Summary collapse
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(shortcode) ⇒ Handler
constructor
A new instance of Handler.
- #render ⇒ Object
Constructor Details
#initialize(shortcode) ⇒ Handler
Returns a new instance of Handler.
10 11 12 |
# File 'lib/shortcodes/handler.rb', line 10 def initialize(shortcode) @shortcode = shortcode end |
Instance Attribute Details
#shortcode ⇒ Object (readonly)
Returns the value of attribute shortcode.
9 10 11 |
# File 'lib/shortcodes/handler.rb', line 9 def shortcode @shortcode end |
Class Method Details
.call(shortcode) ⇒ Object
5 6 7 |
# File 'lib/shortcodes/handler.rb', line 5 def self.call(shortcode) new(shortcode).render end |
Instance Method Details
#attributes ⇒ Object
14 15 16 |
# File 'lib/shortcodes/handler.rb', line 14 def attributes shortcode.attributes end |
#render ⇒ Object
18 19 20 |
# File 'lib/shortcodes/handler.rb', line 18 def render raise NotImplementedError end |