Sha256: d7811283a1308b0436b2a72dcd683712c0686089e7a61e19d475f2d42b2ad890

Contents?: true

Size: 486 Bytes

Versions: 4

Compression:

Stored size: 486 Bytes

Contents

require "formalist/form/result/section"

module Formalist
  class Form
    module Definition
      class Section
        attr_reader :name
        attr_reader :config
        attr_reader :children

        def initialize(name, config = {}, children = [])
          @name = name
          @config = config
          @children = children
        end

        def call(input, rules, errors)
          Result::Section.new(self, input, rules, errors)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
formalist-0.2.2 lib/formalist/form/definition/section.rb
formalist-0.2.1 lib/formalist/form/definition/section.rb
formalist-0.2.0 lib/formalist/form/definition/section.rb
formalist-0.1.0 lib/formalist/form/definition/section.rb