Sha256: 05eb8a9d62ac343ca8a760cf636668083502be7ce945002ce840a6aa600b4a65

Contents?: true

Size: 898 Bytes

Versions: 1

Compression:

Stored size: 898 Bytes

Contents

# frozen_string_literal: true

# This file reopens the "Menu" class which was dynamically
# created by the WCC::Contentful gem.  This class does not need to do anything,
# the attributes have already been defined based on the `content_type` returned
# from the Contentful API.  However you can reopen the class to add functionality.
class WCC::Contentful::Model::Menu < WCC::Contentful::Model

  # 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

1 entries across 1 versions & 1 rubygems

Version Path
wcc-contentful-0.1.0 lib/generators/wcc/templates/menu/menu.rb