class Contentful::Management::Locale
Public Class Methods
create_attributes(_client, attributes)
click to toggle source
@private
# File lib/contentful/management/locale.rb, line 25 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 36 def query_attributes(attributes) { name: name, code: code, optional: optional, fallbackCode: fallback_code }.merge( attributes.transform_keys(&:to_sym) ) end