Class: RDoc::Generator::Hanna::ERB
- Inherits:
-
ERB
- Object
- ERB
- RDoc::Generator::Hanna::ERB
- Defined in:
- lib/hanna.rb
Instance Method Summary collapse
Instance Method Details
#to_html(binding, values = nil, &block) ⇒ Object
255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/hanna.rb', line 255 def to_html(binding, values = nil, &block) local_values = {} binding.local_variables.each do |lv| local_values[lv] = binding.local_variable_get(lv) end binding.local_variable_set(:values, values) if values binding.local_variable_set(:block, block) if block html = result(binding) local_values.each do |lv, val| binding.local_variable_set(lv, val) end html end |