Class: Component::Base
- Inherits:
-
Object
- Object
- Component::Base
- Defined in:
- app/components/component/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(view, options = {}, &block) ⇒ Base
constructor
A new instance of Base.
- #perform ⇒ Object
Constructor Details
#initialize(view, options = {}, &block) ⇒ Base
Returns a new instance of Base.
3 4 5 6 7 8 |
# File 'app/components/component/base.rb', line 3 def initialize(view, = {}, &block) @view = view @block = block @options = @view_locals = {} end |
Instance Method Details
#perform ⇒ Object
10 11 12 13 |
# File 'app/components/component/base.rb', line 10 def perform @block_output = block_output @view.render partial: self.class.name.underscore, locals: view_locals end |