Sha256: 6903451b445c50f34bcd15a649df4df3bd7e7ceb57f0fe51aa6c5aa34ad6d0a1
Contents?: true
Size: 542 Bytes
Versions: 51
Compression:
Stored size: 542 Bytes
Contents
module Rao module Component class Base def initialize(view, options = {}, &block) @view = view @block = block @options = options @view_locals = {} end def perform @block_output = block_output @view.render partial: self.class.name.underscore, locals: view_locals end private attr_reader :view_locals def block_output return unless @block.present? @view.capture { @block.call(self) } end end end end
Version data entries
51 entries across 51 versions & 1 rubygems