Method: Cuca::Widget#initialize

Defined in:
lib/cuca/widget.rb

#initialize(params = {}, &block) ⇒ Widget

initialize - don’t use widgets directly with .new.

params variables in form of hash(var=>val) to make available to the generator blocks if they require/need params will be passed to the output method block will also be passed to the output method



134
135
136
137
138
139
140
141
142
# File 'lib/cuca/widget.rb', line 134

def initialize(params = {}, &block)
 @_assigns = params[:assigns] || {} 
 @_args = params[:args] || {}
 @_profiler = params[:profiler] || nil
 @_block = block
 @_content = ""

 @@_hints ||= {}
end