Sha256: ff92bdc3075b2c885642eef9fac37b0b291b0402248262a6a966dd7d933e9fcf

Contents?: true

Size: 514 Bytes

Versions: 3

Compression:

Stored size: 514 Bytes

Contents

# frozen_string_literal: true

require_relative './app/exceptions'
require_relative './app/model_validators'
require_relative './ext/model'

module WCC::Contentful::App
  def self.init!
    raise ArgumentError, 'Please first call WCC::Contentful.init!' unless WCC::Contentful.types

    # Extend all model types w/ validation & extra fields
    WCC::Contentful.types.each_value do |t|
      file = File.dirname(__FILE__) + "/model/#{t.name.underscore}.rb"
      require file if File.exist?(file)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wcc-contentful-app-0.3.0.pre.rc2 lib/wcc/contentful/app.rb
wcc-contentful-app-0.3.0.pre.rc lib/wcc/contentful/app.rb
wcc-contentful-app-0.2.2 lib/wcc/contentful/app.rb