Class: JsonSchemaView::Renderers::Base Abstract
- Inherits:
-
Object
- Object
- JsonSchemaView::Renderers::Base
- Defined in:
- lib/json_schema_view/renderers/base.rb
Overview
This class is abstract.
Render BaseComponent in a view.
Direct Known Subclasses
Instance Attribute Summary collapse
- #component ⇒ BaseComponent readonly
Instance Method Summary collapse
-
#initialize(component) ⇒ Base
constructor
A new instance of Base.
-
#render_in(view_context) ⇒ String
Render the React component by using react_on_rails.
Constructor Details
#initialize(component) ⇒ Base
Returns a new instance of Base.
12 13 14 |
# File 'lib/json_schema_view/renderers/base.rb', line 12 def initialize(component) @component = component end |
Instance Attribute Details
#component ⇒ BaseComponent (readonly)
9 10 11 |
# File 'lib/json_schema_view/renderers/base.rb', line 9 def component @component end |
Instance Method Details
#render_in(view_context) ⇒ String
Render the React component by using react_on_rails. This method is used by ActionView::Template::Renderable.
22 23 24 |
# File 'lib/json_schema_view/renderers/base.rb', line 22 def render_in(view_context) raise NotImplementedError end |