Sha256: a008326dafd26b2b73c6d8229e48e81dc62f53d6c2232c9d3807af0dcf6ab31a
Contents?: true
Size: 291 Bytes
Versions: 4
Compression:
Stored size: 291 Bytes
Contents
module Salus class BlockRenderer < BaseRenderer def initialize(opts={}, &block) super(opts) raise ArgumentError, "Block must be supplied" unless block_given? @proc = block end def render(data) instance_exec(data, &@proc) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
salus-0.2.1 | lib/salus/renderer/block.rb |
salus-0.2.0 | lib/salus/renderer/block.rb |
salus-0.1.3 | lib/salus/renderer/block.rb |
salus-0.1.2 | lib/salus/renderer/block.rb |