Sha256: 5b792a2da82f8dec4d2771396df06d57777099cc6e14e40cde5b721375518b9f

Contents?: true

Size: 910 Bytes

Versions: 1

Compression:

Stored size: 910 Bytes

Contents

# frozen_string_literal: true

# This file reopens the "MenuButton" 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::MenuButton < 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 "text" attribute to always be camelized.
  # #          `@text` is populated by the gem in the initializer.
  # def text
  #   @text_camelized ||= @text.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_button.rb