Method: Contentful::Management::Entry#method_missing

Defined in:
lib/contentful/management/entry.rb

#method_missing(name, *args, &block) ⇒ Object (private)

rubocop:disable Style/MethodMissing



222
223
224
225
226
227
228
229
230
231
232
# File 'lib/contentful/management/entry.rb', line 222

def method_missing(name, *args, &block)
  if content_type.nil?
    fetch_content_type

    Contentful::Management::Resource::FieldAware.create_fields_for_content_type(self)

    return send(name, *args, &block) if respond_to? name
  end

  fail NameError.new("undefined local variable or method `#{name}' for #{self.class}:#{sys[:id]}", name)
end