Sha256: 1f2b7213964a8877754c14845aaca159ddd7c6ab7f98eb5d0a300adfb33edc81

Contents?: true

Size: 293 Bytes

Versions: 1

Compression:

Stored size: 293 Bytes

Contents

require 'active_support/inflections'

module ActiveModel
  module CsvrizerFactory
    def self.new(object, options = {})
      return ActiveModel::Csvrizer.new(nil) if object.nil?
      klass = object.model_name.name + 'Csvrizer'
      klass.constantize.new(object, options)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
csverizer-0.0.4 lib/active_model/csverizer_factory.rb