class Fabychy::DataTypes::ButtonTemplatePayload

Public Class Methods

new(*params) click to toggle source
Calls superclass method
# File lib/fabychy/data_types/button_template_payload.rb, line 6
def initialize *params
  super(*params)
  @template_type = 'button'
end

Public Instance Methods

validations() click to toggle source
Calls superclass method Fabychy::DataTypes::Payload#validations
# File lib/fabychy/data_types/button_template_payload.rb, line 11
def validations
  super.merge(
    {
      text: {required: false, drop_empty: true, class: [String] },
      buttons: {required: true, class: [Array], inner_class: [Button] }
    }
  )
end