Sha256: c259c4f82551f3f70865d568890596afbf91d7bdaa0d3ff6ac690666bd436496

Contents?: true

Size: 499 Bytes

Versions: 6

Compression:

Stored size: 499 Bytes

Contents

module Trestle
  class Form
    require_relative "form/automatic"
    require_relative "form/builder"
    require_relative "form/field"
    require_relative "form/fields"
    require_relative "form/renderer"

    attr_reader :options, :block

    def initialize(options={}, &block)
      @options, @block = options, block
    end

    def dialog?
      options[:dialog] == true
    end

    def render(template, instance)
      Renderer.new(template).render_form(instance, &block)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
trestle-0.9.8 lib/trestle/form.rb
trestle-0.9.7 lib/trestle/form.rb
trestle-0.9.6 lib/trestle/form.rb
trestle-0.9.5 lib/trestle/form.rb
trestle-0.9.4 lib/trestle/form.rb
trestle-0.9.3 lib/trestle/form.rb