Class: Fabychy::DataTypes::Button
- Defined in:
- lib/fabychy/data_types/button.rb
Instance Method Summary collapse
-
#initialize(*params) ⇒ Button
constructor
A new instance of Button.
- #validations ⇒ Object
Constructor Details
#initialize(*params) ⇒ Button
Returns a new instance of Button.
9 10 11 |
# File 'lib/fabychy/data_types/button.rb', line 9 def initialize *params super(*params) end |
Instance Method Details
#validations ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/fabychy/data_types/button.rb', line 13 def validations { type: { required: true, class: [String], in: ["web_url", "postback"] }, title: { required: true, class: [String] }, url: { required: false, drop_empty:true, class: [String], exclusive: true }, payload: { required: false, drop_empty: true, class: [String], exclusive: true }, } end |