Sha256: a2b7e644d8ea9c87e064c289d8e567881f2d07088d6ec77585fd8d441a1988be

Contents?: true

Size: 362 Bytes

Versions: 3

Compression:

Stored size: 362 Bytes

Contents

# frozen_string_literal: true

class Tramway::ExtendableForm
  class << self
    include Tramway::ExtendableFormsHelpers::ClassBuilder

    def new(name, simple_properties: {}, **more_properties)
      if Object.const_defined? name
        name.constantize
      else
        build_form_class name, simple_properties, more_properties
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tramway-0.1.2 app/forms/tramway/extendable_form.rb
tramway-0.1.1.1 app/forms/tramway/extendable_form.rb
tramway-0.1.1 app/forms/tramway/extendable_form.rb