Class: FlowChat::Whatsapp::Renderer
- Inherits:
-
Object
- Object
- FlowChat::Whatsapp::Renderer
- Defined in:
- lib/flow_chat/whatsapp/renderer.rb
Instance Attribute Summary collapse
-
#choices ⇒ Object
readonly
Returns the value of attribute choices.
-
#media ⇒ Object
readonly
Returns the value of attribute media.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(message, choices: nil, media: nil) ⇒ Renderer
constructor
A new instance of Renderer.
- #render ⇒ Object
Constructor Details
#initialize(message, choices: nil, media: nil) ⇒ Renderer
Returns a new instance of Renderer.
6 7 8 9 10 |
# File 'lib/flow_chat/whatsapp/renderer.rb', line 6 def initialize(, choices: nil, media: nil) @message = @choices = choices @media = media end |
Instance Attribute Details
#choices ⇒ Object (readonly)
Returns the value of attribute choices.
4 5 6 |
# File 'lib/flow_chat/whatsapp/renderer.rb', line 4 def choices @choices end |
#media ⇒ Object (readonly)
Returns the value of attribute media.
4 5 6 |
# File 'lib/flow_chat/whatsapp/renderer.rb', line 4 def media @media end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
4 5 6 |
# File 'lib/flow_chat/whatsapp/renderer.rb', line 4 def @message end |
Instance Method Details
#render ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/flow_chat/whatsapp/renderer.rb', line 12 def render if media && choices elsif media elsif choices else end end |