Class: Rubychy::DataTypes::Text

Inherits:
SentMessage show all
Defined in:
lib/rubychy/data_types/text.rb

Instance Method Summary collapse

Constructor Details

#initialize(*params) ⇒ Text

Returns a new instance of Text.



7
8
9
10
# File 'lib/rubychy/data_types/text.rb', line 7

def initialize *params
  super(*params)
  @type = 'text'
end

Instance Method Details

#validationsObject



12
13
14
15
16
17
18
19
20
# File 'lib/rubychy/data_types/text.rb', line 12

def validations
  {
    body: { required: true, class: [String] },
    to: { required: true, class: [String] },
    type: { required: true, class: [String] },
    chatId: { required: true, class: [String] },
    keyboards: { required: false, class: [Array] },
  }
end