Module: Contentful::Resource::AssetFields

Included in:
Asset
Defined in:
lib/contentful/resource/asset_fields.rb

Overview

Special fields for Asset. Don’t include together wit Contentful::Resource::Fields

It depends on system properties being available

Constant Summary collapse

FIELDS_COERCIONS =

Special field coercions for Asset.

{
  title: :string,
  description: :string,
  file: File
}

Instance Method Summary collapse

Instance Method Details

#fields(wanted_locale = default_locale) ⇒ Hash

Returns all fields of the asset

Returns:

  • (Hash)

    localized fields



19
20
21
# File 'lib/contentful/resource/asset_fields.rb', line 19

def fields(wanted_locale = default_locale)
  @fields[locale || wanted_locale]
end