Class: Lifer::Builder::HTML::FromAny
- Inherits:
-
Object
- Object
- Lifer::Builder::HTML::FromAny
- Defined in:
- lib/lifer/builder/html/from_any.rb
Overview
A base class for all HTML builder adapters. The methods provided by this class are either required or reusable by builder subclasses. See the committed HTML builder adapter classes for example implementations.
Direct Known Subclasses
Class Method Summary collapse
-
.build(entry:) ⇒ String
Build and render an entry.
Instance Method Summary collapse
-
#render ⇒ Object
The base class does not provide a render method, but any subclass should be expected to.
Class Method Details
.build(entry:) ⇒ String
Build and render an entry.
12 13 14 |
# File 'lib/lifer/builder/html/from_any.rb', line 12 def build(entry:) new(entry: entry).render end |
Instance Method Details
#render ⇒ Object
The base class does not provide a render method, but any subclass should be expected to.
21 22 23 24 |
# File 'lib/lifer/builder/html/from_any.rb', line 21 def render raise NotImplementedError, "subclasses must implement a custom `#render` method" end |