Sha256: 8e76ee705db40a6714f09b1a7e9cd03b82e8a8a70723d0febd161db8a08415d5
Contents?: true
Size: 807 Bytes
Versions: 10
Compression:
Stored size: 807 Bytes
Contents
# frozen_string_literal: true # This model represents the 'menu' content type in Contentful. Any linked # entries of the 'menu' content type will be resolved as instances of this class. # It exposes #find, #find_by, and #find_all methods to query Contentful. class Menu < WCC::Contentful::Model::Menu # Add custom validations to ensure that app-specific properties exist: # validate_field :foo, :String, :required # validate_field :bar_links, :Array, link_to: %w[bar baz] # Override functionality or add utilities # # # Example: override equality # def ===(other) # ... # end # # # Example: override "name" attribute to always be camelized. # # `@name` is populated by the gem in the initializer. # def name # @name_camelized ||= @name.camelize(true) # end end
Version data entries
10 entries across 10 versions & 2 rubygems