Sha256: 5f11fdc50ae2343d4e58cae93ca6b2286ff07bf1072e12b1a828c41144679c44

Contents?: true

Size: 377 Bytes

Versions: 7

Compression:

Stored size: 377 Bytes

Contents

module DynamicScaffold
  module Form
    module Item
      class Block < Base
        def initialize(config, type, name, options = {}, &block)
          super(config, type, name, options)
          @block = block
        end

        def render(view, form, classnames = nil)
          view.instance_exec(form, self, classnames, &@block)
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dynamic_scaffold-1.12.2 lib/dynamic_scaffold/form/item/block.rb
dynamic_scaffold-1.12.1 lib/dynamic_scaffold/form/item/block.rb
dynamic_scaffold-1.12.0 lib/dynamic_scaffold/form/item/block.rb
dynamic_scaffold-1.11.0 lib/dynamic_scaffold/form/item/block.rb
dynamic_scaffold-1.10.0 lib/dynamic_scaffold/form/item/block.rb
dynamic_scaffold-1.9.0 lib/dynamic_scaffold/form/item/block.rb
dynamic_scaffold-1.8.1 lib/dynamic_scaffold/form/item/block.rb