Method: Contentful::Management::Resource::Fields#fields

Defined in:
lib/contentful/management/resource/fields.rb

#fields(wanted_locale = nil) ⇒ Hash

Returns the fields hash for the specified locale

Parameters:

  • wanted_locale (String) (defaults to: nil)

Returns:

  • (Hash)

    localized fields



15
16
17
18
# File 'lib/contentful/management/resource/fields.rb', line 15

def fields(wanted_locale = nil)
  wanted_locale = internal_resource_locale if wanted_locale.nil?
  @fields.fetch(wanted_locale.to_s, {})
end