Class: Frails::Component::React
- Defined in:
- lib/frails/component/react.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
Returns the value of attribute class_name.
-
#content_loader ⇒ Object
Returns the value of attribute content_loader.
-
#prerender ⇒ Object
Returns the value of attribute prerender.
-
#props ⇒ Object
Returns the value of attribute props.
-
#tag ⇒ Object
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(view, path, options) ⇒ React
constructor
A new instance of React.
Methods inherited from Abstract
after_render, before_render, #method_missing
Constructor Details
#initialize(view, path, options) ⇒ React
Returns a new instance of React.
6 7 8 9 10 11 12 13 14 |
# File 'lib/frails/component/react.rb', line 6 def initialize(view, path, ) super @class_name = @options.fetch(:class, nil) @props = @options.fetch(:props, {}) @tag = @options.fetch(:tag, :div) @prerender = @options.fetch(:prerender, false) @content_loader = @options.fetch(:content_loader, false) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Frails::Component::Abstract
Instance Attribute Details
#class_name ⇒ Object
Returns the value of attribute class_name.
4 5 6 |
# File 'lib/frails/component/react.rb', line 4 def class_name @class_name end |
#content_loader ⇒ Object
Returns the value of attribute content_loader.
4 5 6 |
# File 'lib/frails/component/react.rb', line 4 def content_loader @content_loader end |
#prerender ⇒ Object
Returns the value of attribute prerender.
4 5 6 |
# File 'lib/frails/component/react.rb', line 4 def prerender @prerender end |
#props ⇒ Object
Returns the value of attribute props.
4 5 6 |
# File 'lib/frails/component/react.rb', line 4 def props @props end |
#tag ⇒ Object
Returns the value of attribute tag.
4 5 6 |
# File 'lib/frails/component/react.rb', line 4 def tag @tag end |