class Contentful::Management::Locale
Public Class Methods
create_attributes(_client, attributes)
click to toggle source
@private
# File lib/contentful/management/locale.rb, line 23 def self.create_attributes(_client, attributes) { 'name' => attributes.fetch(:name), 'code' => attributes.fetch(:code), 'optional' => attributes.fetch(:optional, false), 'fallbackCode' => attributes.fetch(:fallback_code, nil) } end
Protected Instance Methods
query_attributes(attributes)
click to toggle source
# File lib/contentful/management/locale.rb, line 34 def query_attributes(attributes) { name: name, code: code, optional: optional, fallbackCode: fallback_code }.merge( attributes.each_with_object({}) { |(k, v), result| result[k.to_sym] = v } ) end