Sha256: 658049e757630e079dffbbd77ecadecc0f50e4fb0288bc3b1eb32e0e437e0947

Contents?: true

Size: 553 Bytes

Versions: 4

Compression:

Stored size: 553 Bytes

Contents

module Yaks
  class Mapper
    class Form
      class Config
        include Attributes.new(
                  name: nil,
                  action: nil,
                  title: nil,
                  method: nil,
                  media_type: nil,
                  fields: [],
                  dynamic_blocks: [],
                  if: nil
                )

        def dynamic(&blk)
          append_to(:dynamic_blocks, blk)
        end

        def condition(prc = nil, &blk)
          with(if: prc || blk)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
yaks-0.8.3 lib/yaks/mapper/form/config.rb
yaks-0.8.2 lib/yaks/mapper/form/config.rb
yaks-0.8.1 lib/yaks/mapper/form/config.rb
yaks-0.8.0 lib/yaks/mapper/form/config.rb