Class: Contentful::Entry

Inherits:
FieldsResource show all
Includes:
ResourceReferences
Defined in:
lib/contentful/entry.rb

Overview

Resource class for Entry.

See Also:

  • https://www.contentful.com/developers/documentation/content-delivery-api/#entries

Instance Attribute Summary

Attributes inherited from FieldsResource

#localized

Attributes inherited from BaseResource

#default_locale, #raw, #sys

Instance Method Summary collapse

Methods included from ResourceReferences

#incoming_references

Methods inherited from FieldsResource

#fields, #fields_with_locales, #initialize, #locales

Methods inherited from BaseResource

#==, #initialize, #reload

Constructor Details

This class inherits a constructor from Contentful::FieldsResource

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



94
95
96
97
98
# File 'lib/contentful/entry.rb', line 94

def method_missing(name, *args, &block)
  return empty_field_error(name) if content_type_field?(name)

  super
end

Instance Method Details

#entry?Boolean

Returns true for resources that are entries

Returns:

  • (Boolean)


13
14
15
# File 'lib/contentful/entry.rb', line 13

def entry?
  true
end