Class: Fabychy::DataTypes::GenericElement

Inherits:
Element
  • Object
show all
Defined in:
lib/fabychy/data_types/generic_element.rb

Instance Method Summary collapse

Constructor Details

#initialize(*params) ⇒ GenericElement

Returns a new instance of GenericElement.



7
8
9
# File 'lib/fabychy/data_types/generic_element.rb', line 7

def initialize *params
  super(*params)
end

Instance Method Details

#validationsObject



11
12
13
14
15
16
17
18
# File 'lib/fabychy/data_types/generic_element.rb', line 11

def validations
  super.merge(
    {
      item_url: { required: false, drop_empty: true, class: [String] },
      buttons: { required: false, drop_empty: true, class: [Array], inner_class: [Fabychy::DataTypes::Button] },
    }
  )
end