Sha256: fd8507df697c1504b2002d5868bfa2b36802b4581f7aa75adaff4d3c86e4b4e8

Contents?: true

Size: 586 Bytes

Versions: 2

Compression:

Stored size: 586 Bytes

Contents

require "virtus"
require "active_model"

module FunkyForm
  # Extends class with FunkyForm methods
  #
  # @param [Class] descendant
  def self.included(descendant)
    super
    descendant.send(:include, Virtus.model)
    descendant.send(:include, ActiveModel::Validations)
    descendant.send(:include, ActiveModel::Conversion)
    descendant.send(:include, InstanceMethods)
    descendant.extend(ClassMethods)
  end
  private_class_method :included
end

require_relative "funky_form/version"
require_relative "funky_form/class_methods"
require_relative "funky_form/instance_methods"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
funky_form-0.2.1 lib/funky_form.rb
funky_form-0.2.0 lib/funky_form.rb