Class: Whatsapp::Messages::Interactive::Body
- Defined in:
- lib/ruby/whatsapp/messages/interactive/body.rb
Defined Under Namespace
Modules: Defaults
Instance Attribute Summary collapse
Class Method Summary collapse
-
.serialize(text) ⇒ Hash
Serialized representation of the Header.
Instance Method Summary collapse
-
#initialize(text) ⇒ Body
constructor
A new instance of Body.
-
#serialize ⇒ Hash
Serialized representation of the Header.
Constructor Details
#initialize(text) ⇒ Body
Returns a new instance of Body.
17 18 19 20 21 |
# File 'lib/ruby/whatsapp/messages/interactive/body.rb', line 17 def initialize(text) @text = text validate! end |
Instance Attribute Details
#text ⇒ String
13 14 15 |
# File 'lib/ruby/whatsapp/messages/interactive/body.rb', line 13 def text @text end |
Class Method Details
.serialize(text) ⇒ Hash
Returns Serialized representation of the Header.
25 26 27 |
# File 'lib/ruby/whatsapp/messages/interactive/body.rb', line 25 def serialize(text) new(text).serialize end |
Instance Method Details
#serialize ⇒ Hash
Returns Serialized representation of the Header.
31 32 33 34 35 |
# File 'lib/ruby/whatsapp/messages/interactive/body.rb', line 31 def serialize { text:, } end |